diff --git a/godog.go b/godog.go index 1002db9..a37f679 100644 --- a/godog.go +++ b/godog.go @@ -42,4 +42,4 @@ Godog was inspired by Behat and Cucumber the above description is taken from it' package godog // Version of package - based on Semantic Versioning 2.0.0 http://semver.org/ -const Version = "v0.6.2" +const Version = "v0.6.3" diff --git a/suite_test.go b/suite_test.go index 588a5cc..101e002 100644 --- a/suite_test.go +++ b/suite_test.go @@ -389,16 +389,16 @@ func (s *suiteContext) theseEventsHadToBeFiredForNumberOfTimes(tbl *gherkin.Data } func (s *suiteContext) theRenderJSONWillBe(docstring *gherkin.DocString) error { - + loc := regexp.MustCompile(`"suite_test.go:\d+"`) var expected []cukeFeatureJSON - if err := json.Unmarshal([]byte(docstring.Content), &expected); err != nil { + if err := json.Unmarshal([]byte(loc.ReplaceAllString(docstring.Content, `"suite_test.go:0"`)), &expected); err != nil { return err } var actual []cukeFeatureJSON re := regexp.MustCompile(`"duration":\s*\d+`) replaced := re.ReplaceAllString(s.out.String(), `"duration": -1`) - if err := json.Unmarshal([]byte(replaced), &actual); err != nil { + if err := json.Unmarshal([]byte(loc.ReplaceAllString(replaced, `"suite_test.go:0"`)), &actual); err != nil { return err }