@@ -18,31 +18,6 @@ module Formatter
1818 run_defined_feature
1919 end
2020
21- describe 'with a scenario with no steps' do
22- define_feature <<-FEATURE
23- Feature: Banana party
24-
25- Scenario: Monkey eats bananas
26- FEATURE
27-
28- it 'outputs the json data' do
29- expect ( load_normalised_json ( @out ) ) . to eq MultiJson . load ( %{
30- [{"id": "banana-party",
31- "uri": "spec.feature",
32- "keyword": "Feature",
33- "name": "Banana party",
34- "line": 1,
35- "description": "",
36- "elements":
37- [{"id": "banana-party;monkey-eats-bananas",
38- "keyword": "Scenario",
39- "name": "Monkey eats bananas",
40- "line": 3,
41- "description": "",
42- "type": "scenario"}]}]} )
43- end
44- end
45-
4621 describe 'with a scenario with an undefined step' do
4722 define_feature <<-FEATURE
4823 Feature: Banana party
@@ -106,7 +81,7 @@ module Formatter
10681 [{"keyword": "Given ",
10782 "name": "there are bananas",
10883 "line": 4,
109- "match": {"location": "spec/cucumber/formatter/json_spec.rb:87 "},
84+ "match": {"location": "spec/cucumber/formatter/json_spec.rb:62 "},
11085 "result": {"status": "passed",
11186 "duration": 1}}]}]}]} )
11287 end
@@ -143,9 +118,9 @@ module Formatter
143118 [{"keyword": "Given ",
144119 "name": "there are bananas",
145120 "line": 4,
146- "match": {"location": "spec/cucumber/formatter/json_spec.rb:124 "},
121+ "match": {"location": "spec/cucumber/formatter/json_spec.rb:99 "},
147122 "result": {"status": "failed",
148- "error_message": "no bananas (RuntimeError)\\ n./spec/cucumber/formatter/json_spec.rb:124 :in `/^there are bananas$/'\\ nspec.feature:4:in `Given there are bananas'",
123+ "error_message": "no bananas (RuntimeError)\\ n./spec/cucumber/formatter/json_spec.rb:99 :in `/^there are bananas$/'\\ nspec.feature:4:in `Given there are bananas'",
149124 "duration": 1}}]}]}]} )
150125 end
151126 end
@@ -181,9 +156,9 @@ module Formatter
181156 [{"keyword": "Given ",
182157 "name": "there are bananas",
183158 "line": 4,
184- "match": {"location": "spec/cucumber/formatter/json_spec.rb:162 "},
159+ "match": {"location": "spec/cucumber/formatter/json_spec.rb:137 "},
185160 "result": {"status": "pending",
186- "error_message": "TODO (Cucumber::Pending)\\ n./spec/cucumber/formatter/json_spec.rb:162 :in `/^there are bananas$/'\\ nspec.feature:4:in `Given there are bananas'",
161+ "error_message": "TODO (Cucumber::Pending)\\ n./spec/cucumber/formatter/json_spec.rb:137 :in `/^there are bananas$/'\\ nspec.feature:4:in `Given there are bananas'",
187162 "duration": 1}}]}]}]} )
188163 end
189164 end
@@ -223,7 +198,7 @@ module Formatter
223198 [{"keyword": "Given ",
224199 "name": "there are bananas",
225200 "line": 8,
226- "match": {"location": "spec/cucumber/formatter/json_spec.rb:204 "},
201+ "match": {"location": "spec/cucumber/formatter/json_spec.rb:179 "},
227202 "result": {"status": "passed",
228203 "duration": 1}}]}]}]} )
229204 end
@@ -277,7 +252,7 @@ module Formatter
277252 [{"keyword": "Given ",
278253 "name": "there are bananas",
279254 "line": 6,
280- "match": {"location": "spec/cucumber/formatter/json_spec.rb:252 "},
255+ "match": {"location": "spec/cucumber/formatter/json_spec.rb:227 "},
281256 "result": {"status": "passed",
282257 "duration": 1}}]},
283258 {"id": "banana-party;monkey-eats-bananas;fruit-table;2",
@@ -296,7 +271,7 @@ module Formatter
296271 [{"keyword": "Given ",
297272 "name": "there are bananas",
298273 "line": 15,
299- "match": {"location": "spec/cucumber/formatter/json_spec.rb:252 "},
274+ "match": {"location": "spec/cucumber/formatter/json_spec.rb:227 "},
300275 "result": {"status": "passed",
301276 "duration": 1}}]}]}]} )
302277 end
@@ -355,7 +330,7 @@ module Formatter
355330 [{"keyword": "Given ",
356331 "name": "there are bananas",
357332 "line": 6,
358- "match": {"location": "spec/cucumber/formatter/json_spec.rb:332 "},
333+ "match": {"location": "spec/cucumber/formatter/json_spec.rb:307 "},
359334 "result": {"status": "passed",
360335 "duration": 1}}]},
361336 {"id": "banana-party;monkey-eats-bananas",
@@ -372,7 +347,7 @@ module Formatter
372347 "line": 11,
373348 "comments": [{"value": "#step comment1",
374349 "line": 10}],
375- "match": {"location": "spec/cucumber/formatter/json_spec.rb:333 "},
350+ "match": {"location": "spec/cucumber/formatter/json_spec.rb:308 "},
376351 "result": {"status": "passed",
377352 "duration": 1}}]},
378353 {"keyword": "Background",
@@ -386,7 +361,7 @@ module Formatter
386361 [{"keyword": "Given ",
387362 "name": "there are bananas",
388363 "line": 6,
389- "match": {"location": "spec/cucumber/formatter/json_spec.rb:332 "},
364+ "match": {"location": "spec/cucumber/formatter/json_spec.rb:307 "},
390365 "result": {"status": "passed",
391366 "duration": 1}}]},
392367 {"id": "banana-party;monkey-eats-bananas;fruit-table;2",
@@ -407,7 +382,7 @@ module Formatter
407382 "line": 22,
408383 "comments": [{"value": "#step comment2",
409384 "line": 15}],
410- "match": {"location": "spec/cucumber/formatter/json_spec.rb:333 "},
385+ "match": {"location": "spec/cucumber/formatter/json_spec.rb:308 "},
411386 "result": {"status": "passed",
412387 "duration": 1}}]}]}]} )
413388 end
@@ -450,7 +425,7 @@ module Formatter
450425 "doc_string": {"value": "the doc string",
451426 "content_type": "",
452427 "line": 5},
453- "match": {"location": "spec/cucumber/formatter/json_spec.rb:428 "},
428+ "match": {"location": "spec/cucumber/formatter/json_spec.rb:403 "},
454429 "result": {"status": "passed",
455430 "duration": 1}}]}]}]} )
456431 end
@@ -488,7 +463,7 @@ module Formatter
488463 "name": "there are bananas",
489464 "line": 4,
490465 "output": ["from step"],
491- "match": {"location": "spec/cucumber/formatter/json_spec.rb:468 "},
466+ "match": {"location": "spec/cucumber/formatter/json_spec.rb:443 "},
492467 "result": {"status": "passed",
493468 "duration": 1}}]}]}]} )
494469 end
@@ -600,7 +575,7 @@ module Formatter
600575 "line": 4,
601576 "embeddings": [{"mime_type": "mime-type",
602577 "data": "YWJj"}],
603- "match": {"location": "spec/cucumber/formatter/json_spec.rb:578 "},
578+ "match": {"location": "spec/cucumber/formatter/json_spec.rb:553 "},
604579 "result": {"status": "passed",
605580 "duration": 1}}]}]}]} )
606581 end
@@ -645,7 +620,7 @@ module Formatter
645620 "line": 4,
646621 "embeddings": [{"mime_type": "image/png",
647622 "data": "Zm9v"}],
648- "match": {"location": "spec/cucumber/formatter/json_spec.rb:618 "},
623+ "match": {"location": "spec/cucumber/formatter/json_spec.rb:593 "},
649624 "result": {"status": "passed",
650625 "duration": 1}}]}]}]} )
651626 end
@@ -686,31 +661,31 @@ module Formatter
686661 "description": "",
687662 "type": "scenario",
688663 "before":
689- [{"match": {"location": "spec/cucumber/formatter/json_spec.rb:663 "},
664+ [{"match": {"location": "spec/cucumber/formatter/json_spec.rb:638 "},
690665 "result": {"status": "passed",
691666 "duration": 1}},
692- {"match": {"location": "spec/cucumber/formatter/json_spec.rb:664 "},
667+ {"match": {"location": "spec/cucumber/formatter/json_spec.rb:639 "},
693668 "result": {"status": "passed",
694669 "duration": 1}}],
695670 "steps":
696671 [{"keyword": "Given ",
697672 "name": "there are bananas",
698673 "line": 4,
699- "match": {"location": "spec/cucumber/formatter/json_spec.rb:670 "},
674+ "match": {"location": "spec/cucumber/formatter/json_spec.rb:645 "},
700675 "result": {"status": "passed",
701676 "duration": 1},
702677 "after":
703- [{"match": {"location": "spec/cucumber/formatter/json_spec.rb:667 "},
678+ [{"match": {"location": "spec/cucumber/formatter/json_spec.rb:642 "},
704679 "result": {"status": "passed",
705680 "duration": 1}},
706- {"match": {"location": "spec/cucumber/formatter/json_spec.rb:668 "},
681+ {"match": {"location": "spec/cucumber/formatter/json_spec.rb:643 "},
707682 "result": {"status": "passed",
708683 "duration": 1}}]}],
709684 "after":
710- [{"match": {"location": "spec/cucumber/formatter/json_spec.rb:666 "},
685+ [{"match": {"location": "spec/cucumber/formatter/json_spec.rb:641 "},
711686 "result": {"status": "passed",
712687 "duration": 1}},
713- {"match": {"location": "spec/cucumber/formatter/json_spec.rb:665 "},
688+ {"match": {"location": "spec/cucumber/formatter/json_spec.rb:640 "},
714689 "result": {"status": "passed",
715690 "duration": 1}}]}]}]} )
716691 end
@@ -748,13 +723,13 @@ module Formatter
748723 [{"keyword": "Given ",
749724 "name": "there are bananas",
750725 "line": 4,
751- "match": {"location": "spec/cucumber/formatter/json_spec.rb:729 "},
726+ "match": {"location": "spec/cucumber/formatter/json_spec.rb:704 "},
752727 "result": {"status": "passed",
753728 "duration": 1}}],
754729 "around":
755730 [{"match": {"location": "unknown_hook_location:1"},
756731 "result": {"status": "failed",
757- "error_message": "error (RuntimeError)\\ n./spec/cucumber/formatter/json_spec.rb:728 :in `Around'",
732+ "error_message": "error (RuntimeError)\\ n./spec/cucumber/formatter/json_spec.rb:703 :in `Around'",
758733 "duration": 1}}]}]}]} )
759734 end
760735 end
@@ -795,7 +770,7 @@ module Formatter
795770 "rows":
796771 [{"cells": ["aa", "bb"]},
797772 {"cells": ["cc", "dd"]}],
798- "match": {"location": "spec/cucumber/formatter/json_spec.rb:773 "},
773+ "match": {"location": "spec/cucumber/formatter/json_spec.rb:748 "},
799774 "result": {"status": "passed",
800775 "duration": 1}}]}]}]} )
801776 end
0 commit comments