cucumber 2.0.0.beta.3 → 2.0.0.beta.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.md +20 -3
- data/cucumber.gemspec +2 -1
- data/examples/tcl/features/step_definitions/fib_steps.rb +1 -1
- data/features/docs/extending_cucumber/custom_formatter.feature +65 -7
- data/features/docs/formatters/debug_formatter.feature +24 -17
- data/features/docs/formatters/pretty_formatter.feature +42 -0
- data/features/docs/formatters/rerun_formatter.feature +3 -2
- data/lib/cucumber/cli/configuration.rb +3 -7
- data/lib/cucumber/cli/main.rb +1 -1
- data/lib/cucumber/{runtime → filters}/gated_receiver.rb +5 -1
- data/lib/cucumber/filters/quit.rb +24 -0
- data/lib/cucumber/filters/randomizer.rb +36 -0
- data/lib/cucumber/filters/tag_limits.rb +40 -0
- data/lib/cucumber/{runtime → filters}/tag_limits/test_case_index.rb +4 -2
- data/lib/cucumber/{runtime → filters}/tag_limits/verifier.rb +4 -2
- data/lib/cucumber/formatter/console.rb +2 -2
- data/lib/cucumber/formatter/debug.rb +1 -8
- data/lib/cucumber/formatter/fanout.rb +27 -0
- data/lib/cucumber/formatter/gherkin_formatter_adapter.rb +1 -3
- data/lib/cucumber/formatter/html.rb +12 -4
- data/lib/cucumber/formatter/ignore_missing_messages.rb +20 -0
- data/lib/cucumber/formatter/junit.rb +2 -2
- data/lib/cucumber/formatter/legacy_api/adapter.rb +1008 -0
- data/lib/cucumber/formatter/legacy_api/ast.rb +374 -0
- data/lib/cucumber/formatter/legacy_api/results.rb +51 -0
- data/lib/cucumber/formatter/legacy_api/runtime_facade.rb +30 -0
- data/lib/cucumber/formatter/pretty.rb +4 -0
- data/lib/cucumber/formatter/rerun.rb +14 -88
- data/lib/cucumber/language_support/language_methods.rb +0 -54
- data/lib/cucumber/multiline_argument/data_table.rb +3 -4
- data/lib/cucumber/platform.rb +1 -1
- data/lib/cucumber/runtime.rb +41 -107
- data/spec/cucumber/{runtime → filters}/gated_receiver_spec.rb +3 -3
- data/spec/cucumber/{runtime → filters}/tag_limits/test_case_index_spec.rb +3 -3
- data/spec/cucumber/{runtime → filters}/tag_limits/verifier_spec.rb +4 -4
- data/spec/cucumber/{runtime/tag_limits/filter_spec.rb → filters/tag_limits_spec.rb} +6 -6
- data/spec/cucumber/formatter/debug_spec.rb +39 -530
- data/spec/cucumber/formatter/html_spec.rb +56 -0
- data/spec/cucumber/formatter/legacy_api/adapter_spec.rb +1902 -0
- data/spec/cucumber/formatter/pretty_spec.rb +128 -0
- data/spec/cucumber/formatter/rerun_spec.rb +106 -0
- data/spec/cucumber/formatter/spec_helper.rb +6 -2
- data/spec/cucumber/rb_support/rb_language_spec.rb +2 -2
- data/spec/cucumber/rb_support/rb_step_definition_spec.rb +1 -1
- data/spec/cucumber/runtime_spec.rb +1 -5
- data/spec/spec_helper.rb +2 -0
- metadata +44 -29
- data/features/docs/extending_cucumber/formatter_callbacks.feature +0 -370
- data/features/docs/output_from_hooks.feature +0 -128
- data/lib/cucumber/reports/legacy_formatter.rb +0 -1349
- data/lib/cucumber/runtime/results.rb +0 -64
- data/lib/cucumber/runtime/tag_limits.rb +0 -15
- data/lib/cucumber/runtime/tag_limits/filter.rb +0 -31
- data/spec/cucumber/reports/legacy_formatter_spec.rb +0 -1860
- data/spec/cucumber/runtime/results_spec.rb +0 -88
@@ -1,370 +0,0 @@
|
|
1
|
-
Feature: Formatter Callback
|
2
|
-
|
3
|
-
Scenario: callback if not expanded
|
4
|
-
Given a file named "features/f.feature" with:
|
5
|
-
"""
|
6
|
-
Feature: I'll use my own
|
7
|
-
because I'm worth it
|
8
|
-
Scenario: just print me
|
9
|
-
Given this step works
|
10
|
-
Scenario Outline: outline
|
11
|
-
Given <x> step works
|
12
|
-
Then <y>
|
13
|
-
Examples:
|
14
|
-
|x|y|
|
15
|
-
|this|that|
|
16
|
-
|here|there|
|
17
|
-
"""
|
18
|
-
And a file named "features/step_definitions/steps.rb" with:
|
19
|
-
"""
|
20
|
-
Given(/^.+ step works$/) { }
|
21
|
-
Then(/^that|there$/) { }
|
22
|
-
"""
|
23
|
-
When I run `cucumber features/f.feature --format debug`
|
24
|
-
Then it should pass with exactly:
|
25
|
-
"""
|
26
|
-
before_features
|
27
|
-
before_feature
|
28
|
-
before_tags
|
29
|
-
after_tags
|
30
|
-
feature_name
|
31
|
-
before_feature_element
|
32
|
-
before_tags
|
33
|
-
after_tags
|
34
|
-
scenario_name
|
35
|
-
before_steps
|
36
|
-
before_step
|
37
|
-
before_step_result
|
38
|
-
step_name
|
39
|
-
after_step_result
|
40
|
-
after_step
|
41
|
-
after_steps
|
42
|
-
after_feature_element
|
43
|
-
before_feature_element
|
44
|
-
before_tags
|
45
|
-
after_tags
|
46
|
-
scenario_name
|
47
|
-
before_steps
|
48
|
-
before_step
|
49
|
-
before_step_result
|
50
|
-
step_name
|
51
|
-
after_step_result
|
52
|
-
after_step
|
53
|
-
before_step
|
54
|
-
before_step_result
|
55
|
-
step_name
|
56
|
-
after_step_result
|
57
|
-
after_step
|
58
|
-
after_steps
|
59
|
-
before_examples_array
|
60
|
-
before_examples
|
61
|
-
examples_name
|
62
|
-
before_outline_table
|
63
|
-
before_table_row
|
64
|
-
before_table_cell
|
65
|
-
table_cell_value
|
66
|
-
after_table_cell
|
67
|
-
before_table_cell
|
68
|
-
table_cell_value
|
69
|
-
after_table_cell
|
70
|
-
after_table_row
|
71
|
-
before_table_row
|
72
|
-
before_table_cell
|
73
|
-
table_cell_value
|
74
|
-
after_table_cell
|
75
|
-
before_table_cell
|
76
|
-
table_cell_value
|
77
|
-
after_table_cell
|
78
|
-
after_table_row
|
79
|
-
before_table_row
|
80
|
-
before_table_cell
|
81
|
-
table_cell_value
|
82
|
-
after_table_cell
|
83
|
-
before_table_cell
|
84
|
-
table_cell_value
|
85
|
-
after_table_cell
|
86
|
-
after_table_row
|
87
|
-
after_outline_table
|
88
|
-
after_examples
|
89
|
-
after_examples_array
|
90
|
-
after_feature_element
|
91
|
-
after_feature
|
92
|
-
after_features
|
93
|
-
|
94
|
-
"""
|
95
|
-
|
96
|
-
|
97
|
-
Scenario: callback if expanded
|
98
|
-
Given a file named "features/f.feature" with:
|
99
|
-
"""
|
100
|
-
Feature: I'll use my own
|
101
|
-
because I'm worth it
|
102
|
-
Scenario: just print me
|
103
|
-
Given this step works
|
104
|
-
Scenario Outline: outline
|
105
|
-
Given <x> step works
|
106
|
-
Then <y>
|
107
|
-
Examples:
|
108
|
-
|x|y|
|
109
|
-
|this|that|
|
110
|
-
|here|there|
|
111
|
-
"""
|
112
|
-
And a file named "features/step_definitions/steps.rb" with:
|
113
|
-
"""
|
114
|
-
Given /^.+ step works$/ do
|
115
|
-
end
|
116
|
-
Then /^that|there$/ do
|
117
|
-
end
|
118
|
-
"""
|
119
|
-
When I run `cucumber features/f.feature --format debug --expand`
|
120
|
-
Then it should pass with exactly:
|
121
|
-
"""
|
122
|
-
before_features
|
123
|
-
before_feature
|
124
|
-
before_tags
|
125
|
-
after_tags
|
126
|
-
feature_name
|
127
|
-
before_feature_element
|
128
|
-
before_tags
|
129
|
-
after_tags
|
130
|
-
scenario_name
|
131
|
-
before_steps
|
132
|
-
before_step
|
133
|
-
before_step_result
|
134
|
-
step_name
|
135
|
-
after_step_result
|
136
|
-
after_step
|
137
|
-
after_steps
|
138
|
-
after_feature_element
|
139
|
-
before_feature_element
|
140
|
-
before_tags
|
141
|
-
after_tags
|
142
|
-
scenario_name
|
143
|
-
before_steps
|
144
|
-
before_step
|
145
|
-
before_step_result
|
146
|
-
step_name
|
147
|
-
after_step_result
|
148
|
-
after_step
|
149
|
-
before_step
|
150
|
-
before_step_result
|
151
|
-
step_name
|
152
|
-
after_step_result
|
153
|
-
after_step
|
154
|
-
after_steps
|
155
|
-
before_examples_array
|
156
|
-
before_examples
|
157
|
-
examples_name
|
158
|
-
before_outline_table
|
159
|
-
scenario_name
|
160
|
-
before_step
|
161
|
-
before_step_result
|
162
|
-
step_name
|
163
|
-
after_step_result
|
164
|
-
after_step
|
165
|
-
before_step
|
166
|
-
before_step_result
|
167
|
-
step_name
|
168
|
-
after_step_result
|
169
|
-
after_step
|
170
|
-
scenario_name
|
171
|
-
before_step
|
172
|
-
before_step_result
|
173
|
-
step_name
|
174
|
-
after_step_result
|
175
|
-
after_step
|
176
|
-
before_step
|
177
|
-
before_step_result
|
178
|
-
step_name
|
179
|
-
after_step_result
|
180
|
-
after_step
|
181
|
-
after_outline_table
|
182
|
-
after_examples
|
183
|
-
after_examples_array
|
184
|
-
after_feature_element
|
185
|
-
after_feature
|
186
|
-
after_features
|
187
|
-
|
188
|
-
"""
|
189
|
-
|
190
|
-
Scenario: callback with background if not expanded
|
191
|
-
Given a file named "features/f.feature" with:
|
192
|
-
"""
|
193
|
-
Feature: I'll use my own
|
194
|
-
because I'm worth it
|
195
|
-
Background:
|
196
|
-
Given this step works
|
197
|
-
Scenario Outline: outline
|
198
|
-
Given <x> step works
|
199
|
-
Then <y>
|
200
|
-
Examples:
|
201
|
-
|x|y|
|
202
|
-
|this|that|
|
203
|
-
|here|there|
|
204
|
-
"""
|
205
|
-
And a file named "features/step_definitions/steps.rb" with:
|
206
|
-
"""
|
207
|
-
Given(/^.+ step works$/) { }
|
208
|
-
Then(/^that|there$/) { }
|
209
|
-
"""
|
210
|
-
When I run `cucumber features/f.feature --format debug`
|
211
|
-
Then it should pass with exactly:
|
212
|
-
"""
|
213
|
-
before_features
|
214
|
-
before_feature
|
215
|
-
before_tags
|
216
|
-
after_tags
|
217
|
-
feature_name
|
218
|
-
before_background
|
219
|
-
background_name
|
220
|
-
before_steps
|
221
|
-
before_step
|
222
|
-
before_step_result
|
223
|
-
step_name
|
224
|
-
after_step_result
|
225
|
-
after_step
|
226
|
-
after_steps
|
227
|
-
after_background
|
228
|
-
before_feature_element
|
229
|
-
before_tags
|
230
|
-
after_tags
|
231
|
-
scenario_name
|
232
|
-
before_steps
|
233
|
-
before_step
|
234
|
-
before_step_result
|
235
|
-
step_name
|
236
|
-
after_step_result
|
237
|
-
after_step
|
238
|
-
before_step
|
239
|
-
before_step_result
|
240
|
-
step_name
|
241
|
-
after_step_result
|
242
|
-
after_step
|
243
|
-
after_steps
|
244
|
-
before_examples_array
|
245
|
-
before_examples
|
246
|
-
examples_name
|
247
|
-
before_outline_table
|
248
|
-
before_table_row
|
249
|
-
before_table_cell
|
250
|
-
table_cell_value
|
251
|
-
after_table_cell
|
252
|
-
before_table_cell
|
253
|
-
table_cell_value
|
254
|
-
after_table_cell
|
255
|
-
after_table_row
|
256
|
-
before_table_row
|
257
|
-
before_table_cell
|
258
|
-
table_cell_value
|
259
|
-
after_table_cell
|
260
|
-
before_table_cell
|
261
|
-
table_cell_value
|
262
|
-
after_table_cell
|
263
|
-
after_table_row
|
264
|
-
before_table_row
|
265
|
-
before_table_cell
|
266
|
-
table_cell_value
|
267
|
-
after_table_cell
|
268
|
-
before_table_cell
|
269
|
-
table_cell_value
|
270
|
-
after_table_cell
|
271
|
-
after_table_row
|
272
|
-
after_outline_table
|
273
|
-
after_examples
|
274
|
-
after_examples_array
|
275
|
-
after_feature_element
|
276
|
-
after_feature
|
277
|
-
after_features
|
278
|
-
|
279
|
-
"""
|
280
|
-
|
281
|
-
Scenario: callback with background if expanded
|
282
|
-
Given a file named "features/f.feature" with:
|
283
|
-
"""
|
284
|
-
Feature: I'll use my own
|
285
|
-
because I'm worth it
|
286
|
-
Background:
|
287
|
-
Given this step works
|
288
|
-
Scenario Outline: outline
|
289
|
-
Given <x> step works
|
290
|
-
Then <y>
|
291
|
-
Examples:
|
292
|
-
|x|y|
|
293
|
-
|this|that|
|
294
|
-
|here|there|
|
295
|
-
"""
|
296
|
-
And a file named "features/step_definitions/steps.rb" with:
|
297
|
-
"""
|
298
|
-
Given /^.+ step works$/ do
|
299
|
-
end
|
300
|
-
Then /^that|there$/ do
|
301
|
-
end
|
302
|
-
"""
|
303
|
-
When I run `cucumber features/f.feature --format debug --expand`
|
304
|
-
Then it should pass with exactly:
|
305
|
-
"""
|
306
|
-
before_features
|
307
|
-
before_feature
|
308
|
-
before_tags
|
309
|
-
after_tags
|
310
|
-
feature_name
|
311
|
-
before_background
|
312
|
-
background_name
|
313
|
-
before_steps
|
314
|
-
before_step
|
315
|
-
before_step_result
|
316
|
-
step_name
|
317
|
-
after_step_result
|
318
|
-
after_step
|
319
|
-
after_steps
|
320
|
-
after_background
|
321
|
-
before_feature_element
|
322
|
-
before_tags
|
323
|
-
after_tags
|
324
|
-
scenario_name
|
325
|
-
before_steps
|
326
|
-
before_step
|
327
|
-
before_step_result
|
328
|
-
step_name
|
329
|
-
after_step_result
|
330
|
-
after_step
|
331
|
-
before_step
|
332
|
-
before_step_result
|
333
|
-
step_name
|
334
|
-
after_step_result
|
335
|
-
after_step
|
336
|
-
after_steps
|
337
|
-
before_examples_array
|
338
|
-
before_examples
|
339
|
-
examples_name
|
340
|
-
before_outline_table
|
341
|
-
scenario_name
|
342
|
-
before_step
|
343
|
-
before_step_result
|
344
|
-
step_name
|
345
|
-
after_step_result
|
346
|
-
after_step
|
347
|
-
before_step
|
348
|
-
before_step_result
|
349
|
-
step_name
|
350
|
-
after_step_result
|
351
|
-
after_step
|
352
|
-
scenario_name
|
353
|
-
before_step
|
354
|
-
before_step_result
|
355
|
-
step_name
|
356
|
-
after_step_result
|
357
|
-
after_step
|
358
|
-
before_step
|
359
|
-
before_step_result
|
360
|
-
step_name
|
361
|
-
after_step_result
|
362
|
-
after_step
|
363
|
-
after_outline_table
|
364
|
-
after_examples
|
365
|
-
after_examples_array
|
366
|
-
after_feature_element
|
367
|
-
after_feature
|
368
|
-
after_features
|
369
|
-
|
370
|
-
"""
|
@@ -1,128 +0,0 @@
|
|
1
|
-
Feature: Hook output feature
|
2
|
-
|
3
|
-
Calls to puts and embed in hook, should be passed to the formatters.
|
4
|
-
|
5
|
-
Background:
|
6
|
-
Given the standard step definitions
|
7
|
-
|
8
|
-
Scenario: Output from hooks
|
9
|
-
Given a file named "features/test.feature" with:
|
10
|
-
"""
|
11
|
-
Feature:
|
12
|
-
Scenario:
|
13
|
-
Given this step passes
|
14
|
-
Scenario Outline:
|
15
|
-
Given this step <status>
|
16
|
-
Examples:
|
17
|
-
| status |
|
18
|
-
| passes |
|
19
|
-
"""
|
20
|
-
And a file named "features/step_definitions/output_steps.rb" with:
|
21
|
-
"""
|
22
|
-
Before do
|
23
|
-
puts "Before hook 1"
|
24
|
-
embed "src", "mime_type", "label"
|
25
|
-
end
|
26
|
-
|
27
|
-
Before do
|
28
|
-
puts "Before hook 2"
|
29
|
-
embed "src", "mime_type", "label"
|
30
|
-
end
|
31
|
-
|
32
|
-
AfterStep do
|
33
|
-
puts "AfterStep hook 1"
|
34
|
-
embed "src", "mime_type", "label"
|
35
|
-
end
|
36
|
-
|
37
|
-
AfterStep do
|
38
|
-
puts "AfterStep hook 2"
|
39
|
-
embed "src", "mime_type", "label"
|
40
|
-
end
|
41
|
-
|
42
|
-
After do
|
43
|
-
puts "After hook 1"
|
44
|
-
embed "src", "mime_type", "label"
|
45
|
-
end
|
46
|
-
|
47
|
-
After do
|
48
|
-
puts "After hook 2"
|
49
|
-
embed "src", "mime_type", "label"
|
50
|
-
end
|
51
|
-
"""
|
52
|
-
When I run `cucumber -f debug`
|
53
|
-
Then the stderr should not contain anything
|
54
|
-
Then it should pass with:
|
55
|
-
"""
|
56
|
-
before_features
|
57
|
-
before_feature
|
58
|
-
before_tags
|
59
|
-
after_tags
|
60
|
-
feature_name
|
61
|
-
before_feature_element
|
62
|
-
before_tags
|
63
|
-
after_tags
|
64
|
-
scenario_name
|
65
|
-
puts
|
66
|
-
embed
|
67
|
-
puts
|
68
|
-
embed
|
69
|
-
before_steps
|
70
|
-
before_step
|
71
|
-
before_step_result
|
72
|
-
step_name
|
73
|
-
after_step_result
|
74
|
-
after_step
|
75
|
-
puts
|
76
|
-
embed
|
77
|
-
puts
|
78
|
-
embed
|
79
|
-
after_steps
|
80
|
-
puts
|
81
|
-
embed
|
82
|
-
puts
|
83
|
-
embed
|
84
|
-
after_feature_element
|
85
|
-
before_feature_element
|
86
|
-
before_tags
|
87
|
-
after_tags
|
88
|
-
scenario_name
|
89
|
-
before_steps
|
90
|
-
before_step
|
91
|
-
before_step_result
|
92
|
-
step_name
|
93
|
-
after_step_result
|
94
|
-
after_step
|
95
|
-
after_steps
|
96
|
-
before_examples_array
|
97
|
-
before_examples
|
98
|
-
examples_name
|
99
|
-
before_outline_table
|
100
|
-
before_table_row
|
101
|
-
before_table_cell
|
102
|
-
table_cell_value
|
103
|
-
after_table_cell
|
104
|
-
after_table_row
|
105
|
-
puts
|
106
|
-
embed
|
107
|
-
puts
|
108
|
-
embed
|
109
|
-
before_table_row
|
110
|
-
before_table_cell
|
111
|
-
table_cell_value
|
112
|
-
after_table_cell
|
113
|
-
after_table_row
|
114
|
-
puts
|
115
|
-
embed
|
116
|
-
puts
|
117
|
-
embed
|
118
|
-
puts
|
119
|
-
embed
|
120
|
-
puts
|
121
|
-
embed
|
122
|
-
after_outline_table
|
123
|
-
after_examples
|
124
|
-
after_examples_array
|
125
|
-
after_feature_element
|
126
|
-
after_feature
|
127
|
-
after_features
|
128
|
-
"""
|