cucumber 0.8.6 → 0.8.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (180) hide show
  1. data/.rspec +1 -1
  2. data/Caliper.yml +4 -0
  3. data/History.txt +1557 -0
  4. data/LICENSE +1 -1
  5. data/README.rdoc +26 -0
  6. data/Rakefile +51 -5
  7. data/VERSION.yml +5 -0
  8. data/bin/cucumber +1 -7
  9. data/cucumber.gemspec +77 -3
  10. data/examples/i18n/ar/features/step_definitons/calculator_steps.rb +1 -1
  11. data/examples/i18n/he/features/step_definitons/calculator_steps.rb +1 -1
  12. data/examples/i18n/ro/features/step_definitons/calculator_steps.rb +7 -4
  13. data/examples/i18n/ro/features/suma.feature +11 -0
  14. data/examples/i18n/ru/features/division.feature +2 -2
  15. data/examples/i18n/tr/features/step_definitons/hesap_makinesi_adimlari.rb +3 -3
  16. data/examples/sinatra/features/support/env.rb +5 -2
  17. data/examples/v8/features/fibonacci.feature +1 -1
  18. data/examples/watir/features/step_definitions/search_steps.rb +1 -1
  19. data/features/announce.feature +164 -0
  20. data/features/around_hooks.feature +232 -0
  21. data/features/background.feature +95 -284
  22. data/features/bug_371.feature +32 -0
  23. data/features/bug_464.feature +16 -0
  24. data/features/bug_475.feature +42 -0
  25. data/features/bug_585_tab_indentation.feature +22 -0
  26. data/features/bug_600.feature +67 -0
  27. data/features/call_steps_from_stepdefs.feature +154 -0
  28. data/features/cucumber_cli.feature +591 -0
  29. data/features/cucumber_cli_outlines.feature +117 -0
  30. data/features/custom_formatter.feature +73 -3
  31. data/features/default_snippets.feature +42 -0
  32. data/features/diffing.feature +25 -0
  33. data/features/drb_server_integration.feature +174 -0
  34. data/features/exception_in_after_block.feature +127 -0
  35. data/features/exception_in_after_step_block.feature +104 -0
  36. data/features/exception_in_before_block.feature +98 -0
  37. data/features/exclude_files.feature +20 -0
  38. data/features/expand.feature +60 -0
  39. data/features/html_formatter.feature +8 -0
  40. data/features/html_formatter/a.html +582 -0
  41. data/features/json_formatter.feature +245 -160
  42. data/features/junit_formatter.feature +88 -0
  43. data/features/language_from_header.feature +30 -0
  44. data/features/language_help.feature +78 -0
  45. data/features/listener_debugger_formatter.feature +42 -0
  46. data/features/multiline_names.feature +44 -0
  47. data/features/negative_tagged_hooks.feature +60 -0
  48. data/features/post_configuration_hook.feature +37 -0
  49. data/features/profiles.feature +126 -0
  50. data/features/rake_task.feature +152 -0
  51. data/features/report_called_undefined_steps.feature +34 -0
  52. data/features/rerun_formatter.feature +45 -0
  53. data/features/simplest.feature +11 -0
  54. data/features/snippet.feature +23 -0
  55. data/features/snippets_when_using_star_keyword.feature +36 -0
  56. data/features/step_definitions/cucumber_steps.rb +153 -7
  57. data/features/step_definitions/extra_steps.rb +2 -0
  58. data/features/step_definitions/simplest_steps.rb +3 -0
  59. data/features/step_definitions/wire_steps.rb +32 -0
  60. data/features/support/env.rb +140 -18
  61. data/features/support/env.rb.simplest +7 -0
  62. data/features/support/fake_wire_server.rb +77 -0
  63. data/features/table_diffing.feature +45 -0
  64. data/features/table_mapping.feature +34 -0
  65. data/features/tag_logic.feature +258 -0
  66. data/features/transform.feature +245 -0
  67. data/features/unicode_table.feature +35 -0
  68. data/features/usage_and_stepdefs_formatter.feature +169 -0
  69. data/features/wire_protocol.feature +332 -0
  70. data/features/wire_protocol_table_diffing.feature +119 -0
  71. data/features/wire_protocol_tags.feature +87 -0
  72. data/features/wire_protocol_timeouts.feature +63 -0
  73. data/features/work_in_progress.feature +156 -0
  74. data/fixtures/json/features/pystring.feature +8 -0
  75. data/fixtures/junit/features/pending.feature +1 -3
  76. data/fixtures/self_test/features/background/background_tagged_before_on_outline.feature +12 -0
  77. data/fixtures/self_test/features/background/background_with_name.feature +7 -0
  78. data/fixtures/self_test/features/background/failing_background.feature +12 -0
  79. data/fixtures/self_test/features/background/failing_background_after_success.feature +11 -0
  80. data/fixtures/self_test/features/background/multiline_args_background.feature +32 -0
  81. data/fixtures/self_test/features/background/passing_background.feature +10 -0
  82. data/fixtures/self_test/features/background/pending_background.feature +10 -0
  83. data/fixtures/self_test/features/background/scenario_outline_failing_background.feature +16 -0
  84. data/fixtures/self_test/features/background/scenario_outline_passing_background.feature +16 -0
  85. data/fixtures/self_test/features/support/env.rb +0 -8
  86. data/fixtures/tickets/features.html +1 -1
  87. data/gem_tasks/examples.rake +1 -1
  88. data/gem_tasks/features.rake +14 -0
  89. data/gem_tasks/sdoc.rake +12 -0
  90. data/lib/cucumber.rb +0 -12
  91. data/lib/cucumber/ast.rb +1 -1
  92. data/lib/cucumber/ast/background.rb +5 -21
  93. data/lib/cucumber/ast/examples.rb +4 -12
  94. data/lib/cucumber/ast/feature.rb +5 -13
  95. data/lib/cucumber/ast/feature_element.rb +4 -9
  96. data/lib/cucumber/ast/outline_table.rb +4 -4
  97. data/lib/cucumber/ast/py_string.rb +80 -0
  98. data/lib/cucumber/ast/scenario.rb +5 -7
  99. data/lib/cucumber/ast/scenario_outline.rb +15 -23
  100. data/lib/cucumber/ast/step.rb +0 -5
  101. data/lib/cucumber/ast/step_invocation.rb +15 -21
  102. data/lib/cucumber/ast/table.rb +8 -14
  103. data/lib/cucumber/ast/tree_walker.rb +48 -10
  104. data/lib/cucumber/cli/configuration.rb +8 -33
  105. data/lib/cucumber/cli/main.rb +35 -20
  106. data/lib/cucumber/cli/options.rb +7 -8
  107. data/lib/cucumber/cli/profile_loader.rb +0 -2
  108. data/lib/cucumber/core_ext/proc.rb +1 -2
  109. data/lib/cucumber/feature_file.rb +15 -47
  110. data/lib/cucumber/formatter/ansicolor.rb +5 -3
  111. data/lib/cucumber/formatter/color_io.rb +23 -0
  112. data/lib/cucumber/formatter/console.rb +23 -27
  113. data/lib/cucumber/formatter/cucumber.css +17 -34
  114. data/lib/cucumber/formatter/cucumber.sass +182 -173
  115. data/lib/cucumber/formatter/html.rb +11 -46
  116. data/lib/cucumber/formatter/io.rb +4 -2
  117. data/lib/cucumber/formatter/json.rb +152 -15
  118. data/lib/cucumber/formatter/json_pretty.rb +6 -5
  119. data/lib/cucumber/formatter/junit.rb +22 -28
  120. data/lib/cucumber/formatter/pdf.rb +6 -6
  121. data/lib/cucumber/formatter/pretty.rb +5 -5
  122. data/lib/cucumber/formatter/rerun.rb +11 -22
  123. data/lib/cucumber/formatter/tag_cloud.rb +35 -0
  124. data/lib/cucumber/formatter/unicode.rb +20 -41
  125. data/lib/cucumber/js_support/js_dsl.js +4 -4
  126. data/lib/cucumber/js_support/js_language.rb +5 -9
  127. data/lib/cucumber/js_support/js_snippets.rb +2 -2
  128. data/lib/cucumber/language_support.rb +2 -2
  129. data/lib/cucumber/parser/gherkin_builder.rb +30 -35
  130. data/lib/cucumber/platform.rb +8 -8
  131. data/lib/cucumber/py_support/py_language.rb +2 -2
  132. data/lib/cucumber/rake/task.rb +31 -74
  133. data/lib/cucumber/rb_support/rb_dsl.rb +0 -1
  134. data/lib/cucumber/rb_support/rb_language.rb +8 -10
  135. data/lib/cucumber/rb_support/rb_step_definition.rb +0 -8
  136. data/lib/cucumber/rb_support/rb_transform.rb +0 -17
  137. data/lib/cucumber/rb_support/rb_world.rb +18 -26
  138. data/lib/cucumber/rspec/doubles.rb +3 -3
  139. data/lib/cucumber/step_match.rb +2 -6
  140. data/lib/cucumber/step_mother.rb +427 -6
  141. data/lib/cucumber/wire_support/configuration.rb +1 -4
  142. data/lib/cucumber/wire_support/wire_language.rb +10 -3
  143. data/spec/cucumber/ast/background_spec.rb +6 -68
  144. data/spec/cucumber/ast/feature_factory.rb +4 -5
  145. data/spec/cucumber/ast/feature_spec.rb +4 -4
  146. data/spec/cucumber/ast/outline_table_spec.rb +1 -1
  147. data/spec/cucumber/ast/py_string_spec.rb +40 -0
  148. data/spec/cucumber/ast/scenario_outline_spec.rb +11 -15
  149. data/spec/cucumber/ast/scenario_spec.rb +4 -4
  150. data/spec/cucumber/ast/step_spec.rb +3 -3
  151. data/spec/cucumber/ast/table_spec.rb +2 -38
  152. data/spec/cucumber/ast/tree_walker_spec.rb +2 -2
  153. data/spec/cucumber/broadcaster_spec.rb +1 -1
  154. data/spec/cucumber/cli/configuration_spec.rb +6 -32
  155. data/spec/cucumber/cli/drb_client_spec.rb +3 -2
  156. data/spec/cucumber/cli/main_spec.rb +43 -43
  157. data/spec/cucumber/cli/options_spec.rb +1 -28
  158. data/spec/cucumber/cli/profile_loader_spec.rb +1 -1
  159. data/spec/cucumber/core_ext/proc_spec.rb +1 -1
  160. data/spec/cucumber/formatter/ansicolor_spec.rb +1 -1
  161. data/spec/cucumber/formatter/color_io_spec.rb +29 -0
  162. data/spec/cucumber/formatter/duration_spec.rb +1 -1
  163. data/spec/cucumber/formatter/html_spec.rb +5 -3
  164. data/spec/cucumber/formatter/junit_spec.rb +2 -16
  165. data/spec/cucumber/formatter/progress_spec.rb +1 -1
  166. data/spec/cucumber/formatter/spec_helper.rb +12 -11
  167. data/spec/cucumber/rb_support/rb_language_spec.rb +28 -241
  168. data/spec/cucumber/rb_support/rb_step_definition_spec.rb +28 -33
  169. data/spec/cucumber/rb_support/regexp_argument_matcher_spec.rb +1 -1
  170. data/spec/cucumber/step_match_spec.rb +9 -11
  171. data/spec/cucumber/step_mother_spec.rb +302 -0
  172. data/spec/cucumber/wire_support/configuration_spec.rb +1 -1
  173. data/spec/cucumber/wire_support/connection_spec.rb +1 -1
  174. data/spec/cucumber/wire_support/wire_exception_spec.rb +1 -1
  175. data/spec/cucumber/wire_support/wire_language_spec.rb +1 -1
  176. data/spec/cucumber/wire_support/wire_packet_spec.rb +1 -1
  177. data/spec/cucumber/wire_support/wire_step_definition_spec.rb +1 -1
  178. data/spec/cucumber/world/pending_spec.rb +2 -2
  179. data/spec/spec_helper.rb +20 -13
  180. metadata +78 -4
@@ -1,137 +1,71 @@
1
1
  Feature: JSON output formatter
2
- In order to simplify processing of Cucumber features and results
3
- Developers should be able to consume features as JSON
2
+ In order to get results as data
3
+ As a developer
4
+ Cucumber should be able to output JSON
4
5
 
5
6
  Background:
6
- Given a file named "features/one_passing_one_failing.feature" with:
7
- """
8
- @a
9
- Feature: One passing scenario, one failing scenario
10
-
11
- @b
12
- Scenario: Passing
13
- Given a passing step
14
-
15
- @c
16
- Scenario: Failing
17
- Given a failing step
18
- """
19
- And a file named "features/step_definitions/steps.rb" with:
20
- """
21
- Given /a passing step/ do
22
- #does nothing
23
- end
24
-
25
- Given /a failing step/ do
26
- fail
27
- end
28
-
29
- Given /a pending step/ do
30
- pending
31
- end
32
-
33
- Given /^I add (\d+) and (\d+)$/ do |a,b|
34
- @result = a.to_i + b.to_i
35
- end
7
+ Given I am in json
36
8
 
37
- Then /^I the result should be (\d+)$/ do |c|
38
- @result.should == c.to_i
39
- end
40
-
41
- Then /^I should see/ do |string|
42
-
43
- end
44
-
45
- Given /^I pass a table argument/ do |table|
46
-
47
- end
48
-
49
- Given /^I embed a screenshot/ do
50
- File.open("screenshot.png", "w") { |file| file << "foo" }
51
- embed "screenshot.png", "image/png"
52
- end
9
+ Scenario: one feature, one passing scenario, one failing scenario
10
+ And the tmp directory is empty
11
+ When I run cucumber --format json --out tmp/out.json features/one_passing_one_failing.feature
12
+ Then STDERR should be empty
13
+ And it should fail with
53
14
  """
54
- And a file named "features/embed.feature" with:
55
15
  """
56
- Feature: A screenshot feature
57
-
58
- Scenario:
59
- Given I embed a screenshot
60
-
61
- """
62
-
63
- Scenario: one feature, one passing scenario, one failing scenario
64
- When I run cucumber "--format json features/one_passing_one_failing.feature"
65
- Then the output should match /^\{"features":\[/
16
+ And "fixtures/json/tmp/out.json" should match "^\{\"features\":\["
66
17
 
67
18
  Scenario: one feature, one passing scenario, one failing scenario
68
- When I run cucumber "--format json features/one_passing_one_failing.feature"
69
- Then it should fail with JSON:
19
+ When I run cucumber --format json_pretty features/one_passing_one_failing.feature
20
+ Then STDERR should be empty
21
+ And it should fail with JSON
70
22
  """
71
23
  {
72
24
  "features": [
73
25
  {
74
- "keyword": "Feature",
26
+ "file": "features/one_passing_one_failing.feature",
75
27
  "name": "One passing scenario, one failing scenario",
76
- "line": 2,
77
- "description": "",
78
28
  "tags": [
79
- {
80
- "name": "@a",
81
- "line": 1
82
- }
29
+ "@a"
83
30
  ],
84
31
  "elements": [
85
32
  {
86
- "keyword": "Scenario",
87
- "name": "Passing",
88
- "line": 5,
89
- "description": "",
90
33
  "tags": [
91
- {
92
- "name": "@b",
93
- "line": 4
94
- }
34
+ "@b"
95
35
  ],
96
- "type": "scenario",
36
+ "keyword": "Scenario",
37
+ "name": "Passing",
38
+ "file_colon_line": "features/one_passing_one_failing.feature:5",
97
39
  "steps": [
98
40
  {
41
+ "status": "passed",
99
42
  "keyword": "Given ",
100
43
  "name": "a passing step",
101
- "line": 6,
102
- "match": {
103
- "location": "features/step_definitions/steps.rb:1"
104
- },
105
- "result": {
106
- "status": "passed"
107
- }
44
+ "file_colon_line": "features/step_definitions/steps.rb:1"
108
45
  }
109
46
  ]
110
47
  },
111
48
  {
112
- "keyword": "Scenario",
113
- "name": "Failing",
114
- "line": 9,
115
- "description": "",
116
49
  "tags": [
117
- {
118
- "name": "@c",
119
- "line": 8
120
- }
50
+ "@c"
121
51
  ],
122
- "type": "scenario",
52
+ "keyword": "Scenario",
53
+ "name": "Failing",
54
+ "file_colon_line": "features/one_passing_one_failing.feature:9",
123
55
  "steps": [
124
56
  {
57
+ "exception": {
58
+ "class": "RuntimeError",
59
+ "message": "",
60
+ "backtrace": [
61
+ "./features/step_definitions/steps.rb:6:in `/a failing step/'",
62
+ "features/one_passing_one_failing.feature:10:in `Given a failing step'"
63
+ ]
64
+ },
65
+ "status": "failed",
125
66
  "keyword": "Given ",
126
67
  "name": "a failing step",
127
- "line": 10,
128
- "match": {
129
- "location": "features/step_definitions/steps.rb:5"
130
- },
131
- "result": {
132
- "status": "failed",
133
- "error_message": " (RuntimeError)\n./features/step_definitions/steps.rb:6:in `/a failing step/'\nfeatures/one_passing_one_failing.feature:10:in `Given a failing step'"
134
- }
68
+ "file_colon_line": "features/step_definitions/steps.rb:5"
135
69
  }
136
70
  ]
137
71
  }
@@ -139,60 +73,153 @@ Feature: JSON output formatter
139
73
  }
140
74
  ]
141
75
  }
142
-
143
76
  """
144
77
 
145
- Scenario: pystring
146
- Given a file named "features/pystring.feature" with:
78
+ Scenario: Tables
79
+ When I run cucumber --format json_pretty features/tables.feature
80
+ Then STDERR should be empty
81
+ And it should fail with JSON
147
82
  """
148
- Feature: A pystring feature
83
+ {
84
+ "features": [
85
+ {
86
+ "file": "features/tables.feature",
87
+ "name": "A scenario outline",
88
+ "tags": [
149
89
 
150
- Scenario:
151
- Then I should fail with
152
- \"\"\"
153
- a string
154
- \"\"\"
155
- """
156
- And a file named "features/step_definitions/pystring_steps.rb" with:
157
- """
158
- Then /I should fail with/ do |s|
159
- raise s
160
- end
161
- """
162
- When I run cucumber "--format json features/pystring.feature"
163
- Then it should fail with JSON:
90
+ ],
91
+ "elements": [
92
+ {
93
+ "tags": [
94
+
95
+ ],
96
+ "keyword": "Scenario Outline",
97
+ "name": "",
98
+ "file_colon_line": "features/tables.feature:3",
99
+ "steps": [
100
+ {
101
+ "status": "skipped",
102
+ "keyword": "Given ",
103
+ "name": "I add <a> and <b>",
104
+ "file_colon_line": "features/step_definitions/steps.rb:13"
105
+ },
106
+ {
107
+ "status": "skipped",
108
+ "keyword": "When ",
109
+ "name": "I pass a table argument",
110
+ "file_colon_line": "features/step_definitions/steps.rb:25",
111
+ "table": [
112
+ {"cells":
113
+ [{"text":"foo", "status": null},
114
+ {"text":"bar", "status": null}]},
115
+ {"cells":
116
+ [{"text": "bar", "status": null},
117
+ {"text": "baz", "status": null}]}
118
+ ]
119
+ },
120
+ {
121
+ "status": "skipped",
122
+ "keyword": "Then ",
123
+ "name": "I the result should be <c>",
124
+ "file_colon_line": "features/step_definitions/steps.rb:17"
125
+ }
126
+ ],
127
+ "examples": {
128
+ "name": "Examples ",
129
+ "table": [
130
+ {
131
+ "cells": [
132
+ {
133
+ "text": "a",
134
+ "status": "skipped_param"
135
+ },
136
+ {
137
+ "text": "b",
138
+ "status": "skipped_param"
139
+ },
140
+ {
141
+ "text": "c",
142
+ "status": "skipped_param"
143
+ }
144
+ ]
145
+ },
146
+ {
147
+ "cells": [
148
+ {
149
+ "text": "1",
150
+ "status": "passed"
151
+ },
152
+ {
153
+ "text": "2",
154
+ "status": "passed"
155
+ },
156
+ {
157
+ "text": "3",
158
+ "status": "passed"
159
+ }
160
+ ]
161
+ },
162
+ {
163
+ "cells": [
164
+ {
165
+ "text": "2",
166
+ "status": "passed"
167
+ },
168
+ {
169
+ "text": "3",
170
+ "status": "passed"
171
+ },
172
+ {
173
+ "text": "4",
174
+ "status": "failed"
175
+ }
176
+ ],
177
+ "exception": {
178
+ "class": "RSpec::Expectations::ExpectationNotMetError",
179
+ "message": "expected: 4,\n got: 5 (using ==)\nDiff:\n@@ -1,2 +1,2 @@\n-4\n+5\n",
180
+ "backtrace": [
181
+ "./features/step_definitions/steps.rb:18:in `/^I the result should be (\\d+)$/'",
182
+ "features/tables.feature:8:in `Then I the result should be <c>'"
183
+ ]
184
+ }
185
+ }
186
+ ]
187
+ }
188
+ }
189
+ ]
190
+ }
191
+ ]
192
+ }
164
193
  """
194
+
195
+ Scenario: pystring
196
+ When I run cucumber --format json_pretty features/pystring.feature
197
+ Then STDERR should be empty
198
+ And it should pass with JSON
199
+ """
165
200
  {
166
201
  "features": [
167
202
  {
168
- "keyword": "Feature",
169
- "name": "A pystring feature",
170
- "line": 1,
171
- "description": "",
203
+ "file": "features/pystring.feature",
204
+ "name": "A py string feature",
205
+ "tags": [
206
+
207
+ ],
172
208
  "elements": [
173
209
  {
210
+ "tags": [
211
+
212
+ ],
174
213
  "keyword": "Scenario",
175
214
  "name": "",
176
- "line": 3,
177
- "description": "",
178
- "type": "scenario",
215
+ "file_colon_line": "features/pystring.feature:3",
179
216
  "steps": [
180
217
  {
218
+ "status": "passed",
181
219
  "keyword": "Then ",
182
- "name": "I should fail with",
183
- "line": 4,
184
- "multiline_arg": {
185
- "value": "a string",
186
- "line": 5,
187
- "type": "doc_string"
188
- },
189
- "match": {
190
- "location": "features/step_definitions/pystring_steps.rb:1"
191
- },
192
- "result": {
193
- "status": "failed",
194
- "error_message": "a string (RuntimeError)\n./features/step_definitions/pystring_steps.rb:2:in `/I should fail with/'\nfeatures/pystring.feature:4:in `Then I should fail with'"
195
- }
220
+ "name": "I should see",
221
+ "file_colon_line": "features/step_definitions/steps.rb:21",
222
+ "py_string": "a string"
196
223
  }
197
224
  ]
198
225
  }
@@ -200,43 +227,102 @@ Feature: JSON output formatter
200
227
  }
201
228
  ]
202
229
  }
203
- """
230
+ """
231
+
232
+ Scenario: background
233
+ When I run cucumber --format json_pretty features/background.feature
234
+ Then STDERR should be empty
235
+ And it should fail with JSON
236
+ """
237
+ {
238
+ "features": [
239
+ {
240
+ "file": "features/background.feature",
241
+ "name": "Feature with background",
242
+ "tags": [
243
+
244
+ ],
245
+ "background": {
246
+ "steps": [
247
+ {
248
+ "status": "passed",
249
+ "keyword": "Given ",
250
+ "name": "a passing step",
251
+ "file_colon_line": "features/step_definitions/steps.rb:1"
252
+ }
253
+ ]
254
+ },
255
+ "elements": [
256
+ {
257
+ "tags": [
258
+
259
+ ],
260
+ "keyword": "Scenario",
261
+ "name": "",
262
+ "file_colon_line": "features/background.feature:6",
263
+ "steps": [
264
+ {
265
+ "status": "passed",
266
+ "keyword": "Given ",
267
+ "name": "a passing step",
268
+ "file_colon_line": "features/step_definitions/steps.rb:1"
269
+ },
270
+ {
271
+ "exception": {
272
+ "class": "RuntimeError",
273
+ "message": "",
274
+ "backtrace": [
275
+ "./features/step_definitions/steps.rb:6:in `/a failing step/'",
276
+ "features/background.feature:7:in `Given a failing step'"
277
+ ]
278
+ },
279
+ "status": "failed",
280
+ "keyword": "Given ",
281
+ "name": "a failing step",
282
+ "file_colon_line": "features/step_definitions/steps.rb:5"
283
+ }
284
+ ]
285
+ }
286
+ ]
287
+ }
288
+ ]
289
+ }
290
+ """
204
291
 
205
292
  Scenario: embedding screenshot
206
- When I run cucumber "-b --format json features/embed.feature"
207
- Then it should pass with JSON:
293
+ When I run cucumber --format json_pretty features/embed.feature
294
+ Then STDERR should be empty
295
+ And it should pass with JSON
208
296
  """
209
297
  {
210
298
  "features": [
211
299
  {
212
- "keyword": "Feature",
300
+ "file": "features/embed.feature",
213
301
  "name": "A screenshot feature",
214
- "line": 1,
215
- "description": "",
302
+ "tags": [
303
+
304
+ ],
216
305
  "elements": [
217
306
  {
307
+ "tags": [
308
+
309
+ ],
218
310
  "keyword": "Scenario",
219
311
  "name": "",
220
- "line": 3,
221
- "description": "",
222
- "type": "scenario",
312
+ "file_colon_line": "features/embed.feature:3",
223
313
  "steps": [
224
314
  {
315
+ "status": "passed",
225
316
  "keyword": "Given ",
226
317
  "name": "I embed a screenshot",
227
- "line": 4,
228
- "embeddings": [
318
+ "file_colon_line": "features/step_definitions/steps.rb:29",
319
+ "embedded": [
229
320
  {
321
+ "file": "tmp/screenshot.png",
230
322
  "mime_type": "image/png",
231
- "data": "Zm9v"
323
+ "data": "Zm9v\n"
232
324
  }
233
- ],
234
- "match": {
235
- "location": "features/step_definitions/steps.rb:29"
236
- },
237
- "result": {
238
- "status": "passed"
239
- }
325
+ ]
240
326
  }
241
327
  ]
242
328
  }
@@ -244,5 +330,4 @@ Feature: JSON output formatter
244
330
  }
245
331
  ]
246
332
  }
247
-
248
333
  """