diff --git a/features/formatter/events.feature b/features/formatter/events.feature index 525beb9..b33554c 100644 --- a/features/formatter/events.feature +++ b/features/formatter/events.feature @@ -9,7 +9,6 @@ Feature: event stream formatter Then the following events should be fired: """ TestRunStarted - TestSource TestRunFinished """ diff --git a/formatter-tests/cucumber/empty b/formatter-tests/cucumber/empty index e16aa51..fe51488 100644 --- a/formatter-tests/cucumber/empty +++ b/formatter-tests/cucumber/empty @@ -1,10 +1 @@ -[ - { - "uri": "formatter-tests/features/empty.feature", - "id": "empty-feature", - "keyword": "Feature", - "name": "empty feature", - "description": "", - "line": 1 - } -] +[] diff --git a/formatter-tests/cucumber/empty_with_description b/formatter-tests/cucumber/empty_with_description index 41e9ac2..fe51488 100644 --- a/formatter-tests/cucumber/empty_with_description +++ b/formatter-tests/cucumber/empty_with_description @@ -1,10 +1 @@ -[ - { - "uri": "formatter-tests/features/empty_with_description.feature", - "id": "empty-feature", - "keyword": "Feature", - "name": "empty feature", - "description": " describes\n an empty\n feature", - "line": 1 - } -] +[] diff --git a/formatter-tests/events/empty b/formatter-tests/events/empty index cfcf75d..f7dac46 100644 --- a/formatter-tests/events/empty +++ b/formatter-tests/events/empty @@ -1,3 +1,2 @@ {"event":"TestRunStarted","version":"0.1.0","timestamp":-6795364578871,"suite":"events"} -{"event":"TestSource","location":"formatter-tests/features/empty.feature:1","source":"Feature: empty feature\n"} {"event":"TestRunFinished","status":"pending","timestamp":-6795364578871,"snippets":"","memory":""} diff --git a/formatter-tests/events/empty_with_description b/formatter-tests/events/empty_with_description index 01891d5..f7dac46 100644 --- a/formatter-tests/events/empty_with_description +++ b/formatter-tests/events/empty_with_description @@ -1,3 +1,2 @@ {"event":"TestRunStarted","version":"0.1.0","timestamp":-6795364578871,"suite":"events"} -{"event":"TestSource","location":"formatter-tests/features/empty_with_description.feature:1","source":"Feature: empty feature\n describes\n an empty\n feature\n"} {"event":"TestRunFinished","status":"pending","timestamp":-6795364578871,"snippets":"","memory":""} diff --git a/formatter-tests/junit/empty b/formatter-tests/junit/empty index 6cfcea3..b95c977 100644 --- a/formatter-tests/junit/empty +++ b/formatter-tests/junit/empty @@ -1,4 +1,2 @@ - - - \ No newline at end of file + \ No newline at end of file diff --git a/formatter-tests/junit/empty_with_description b/formatter-tests/junit/empty_with_description index 6cfcea3..b95c977 100644 --- a/formatter-tests/junit/empty_with_description +++ b/formatter-tests/junit/empty_with_description @@ -1,4 +1,2 @@ - - - \ No newline at end of file + \ No newline at end of file diff --git a/formatter-tests/pretty/empty b/formatter-tests/pretty/empty index 3850b84..5884665 100644 --- a/formatter-tests/pretty/empty +++ b/formatter-tests/pretty/empty @@ -1,4 +1,3 @@ -Feature: empty feature No scenarios No steps diff --git a/formatter-tests/pretty/empty_with_description b/formatter-tests/pretty/empty_with_description index 6ae0404..5884665 100644 --- a/formatter-tests/pretty/empty_with_description +++ b/formatter-tests/pretty/empty_with_description @@ -1,7 +1,3 @@ -Feature: empty feature - describes - an empty - feature No scenarios No steps diff --git a/parser.go b/parser.go index ddb266b..e0b51b0 100644 --- a/parser.go +++ b/parser.go @@ -153,7 +153,7 @@ func filterFeatures(tags string, features []*feature) (result []*feature) { for _, ft := range features { ft.pickles = applyTagFilter(tags, ft.pickles) - if ft.Feature != nil { + if ft.Feature != nil && len(ft.pickles) > 0 { result = append(result, ft) } } diff --git a/run.go b/run.go index b4c2f3b..580142d 100644 --- a/run.go +++ b/run.go @@ -170,10 +170,6 @@ func (r *runner) scenarioConcurrent(rate int) (failed bool) { copy(pickles, ft.pickles) } - if len(pickles) == 0 { - r.fmt.Feature(ft.GherkinDocument, ft.Uri, ft.content) - } - for i, p := range pickles { pickle := *p