From 43dd0a1df3471e68ba4a99f5055163ae9dc7b384 Mon Sep 17 00:00:00 2001 From: Matthew Rothenberg Date: Fri, 5 May 2017 11:43:38 -0400 Subject: [PATCH] fix line numbers in test after rebase --- features/formatter/cucumber.feature | 14 +++++++------- suite_context.go | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/features/formatter/cucumber.feature b/features/formatter/cucumber.feature index b76e261..e4b2cc4 100644 --- a/features/formatter/cucumber.feature +++ b/features/formatter/cucumber.feature @@ -257,7 +257,7 @@ Feature: cucumber json formatter "name": "passing step", "line": 7, "match": { - "location": "suite_context.go:67" + "location": "suite_context.go:64" }, "result": { "status": "passed", @@ -269,7 +269,7 @@ Feature: cucumber json formatter "name": "a failing step", "line": 8, "match": { - "location": "suite_context.go:50" + "location": "suite_context.go:47" }, "result": { "status": "failed", @@ -325,7 +325,7 @@ Feature: cucumber json formatter "name": "passing step", "line": 11, "match": { - "location": "suite_context.go:67" + "location": "suite_context.go:64" }, "result": { "status": "passed", @@ -347,7 +347,7 @@ Feature: cucumber json formatter "name": "failing step", "line": 12, "match": { - "location": "suite_context.go:50" + "location": "suite_context.go:47" }, "result": { "status": "failed", @@ -448,7 +448,7 @@ Feature: cucumber json formatter "line": 8 }, "match": { - "location": "suite_context.go:67" + "location": "suite_context.go:64" }, "result": { "status": "passed", @@ -501,7 +501,7 @@ Feature: cucumber json formatter "name": "passing step", "line": 7, "match": { - "location": "suite_context.go:67" + "location": "suite_context.go:64" }, "result": { "status": "passed", @@ -535,7 +535,7 @@ Feature: cucumber json formatter "name": "passing step", "line": 10, "match": { - "location": "suite_context.go:67" + "location": "suite_context.go:64" }, "result": { "status": "skipped" diff --git a/suite_context.go b/suite_context.go index b439d68..600cae2 100644 --- a/suite_context.go +++ b/suite_context.go @@ -442,14 +442,14 @@ func (s *suiteContext) theseEventsHadToBeFiredForNumberOfTimes(tbl *gherkin.Data } func (s *suiteContext) theRenderJSONWillBe(docstring *gherkin.DocString) error { - loc := regexp.MustCompile(`"suite_test.go:\d+"`) + loc := regexp.MustCompile(`"suite_context.go:\d+"`) var expected []cukeFeatureJSON - if err := json.Unmarshal([]byte(loc.ReplaceAllString(docstring.Content, `"suite_test.go:0"`)), &expected); err != nil { + if err := json.Unmarshal([]byte(loc.ReplaceAllString(docstring.Content, `"suite_context.go:0"`)), &expected); err != nil { return err } var actual []cukeFeatureJSON - replaced := loc.ReplaceAllString(s.out.String(), `"suite_test.go:0"`) + replaced := loc.ReplaceAllString(s.out.String(), `"suite_context.go:0"`) if err := json.Unmarshal([]byte(replaced), &actual); err != nil { return err }