cucumber 3.0.0.pre.2 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (128) hide show
  1. checksums.yaml +4 -4
  2. data/.gitattributes +32 -0
  3. data/.github/ISSUE_TEMPLATE.md +1 -1
  4. data/.github/PULL_REQUEST_TEMPLATE.md +1 -0
  5. data/.rubocop_todo.yml +1 -85
  6. data/.travis.yml +3 -2
  7. data/{History.md → CHANGELOG.md} +77 -13
  8. data/appveyor.yml +2 -1
  9. data/bin/cucumber +2 -1
  10. data/cucumber.gemspec +2 -2
  11. data/examples/i18n/ar/features/step_definitions/calculator_steps.rb +6 -1
  12. data/examples/i18n/bg/features/support/env.rb +6 -1
  13. data/examples/i18n/bg/lib/calculator.rb +2 -1
  14. data/examples/i18n/ca/features/step_definitions/calculator_steps.rb +6 -1
  15. data/examples/i18n/cs/features/step_definitions/calculator_steps.rb +6 -1
  16. data/examples/i18n/da/features/step_definitions/lommeregner_steps.rb +6 -1
  17. data/examples/i18n/de/features/step_definitions/calculator_steps.rb +6 -1
  18. data/examples/i18n/el/features/step_definitions/calculator_steps.rb +6 -1
  19. data/examples/i18n/en-lol/features/support/env.rb +6 -2
  20. data/examples/i18n/en/features/step_definitions/calculator_steps.rb +6 -1
  21. data/examples/i18n/eo/features/step_definitions/calculator_steps.rb +6 -1
  22. data/examples/i18n/es/features/step_definitions/calculador_steps.rb +6 -1
  23. data/examples/i18n/et/features/step_definitions/kalkulaator_steps.rb +6 -1
  24. data/examples/i18n/fi/features/step_definitions/laskin_steps.rb +6 -1
  25. data/examples/i18n/fr/features/support/env.rb +6 -1
  26. data/examples/i18n/he/features/step_definitions/calculator_steps.rb +6 -1
  27. data/examples/i18n/hi/features/step_definitions/calculator_steps.rb +6 -1
  28. data/examples/i18n/ht/features/step_definitions/kalkilatris_steps.rb +6 -2
  29. data/examples/i18n/hu/features/step_definitions/calculator_steps.rb +6 -1
  30. data/examples/i18n/id/features/step_definitions/calculator_steps.rb +6 -1
  31. data/examples/i18n/it/features/step_definitions/calcolatrice_steps.rb +6 -1
  32. data/examples/i18n/ja/features/support/env.rb +6 -1
  33. data/examples/i18n/ko/features/step_definitions/calculator_steps.rb +6 -1
  34. data/examples/i18n/lt/features/step_definitions/calculator_steps.rb +6 -1
  35. data/examples/i18n/lv/features/step_definitions/calculator_steps.rb +6 -1
  36. data/examples/i18n/no/features/support/env.rb +6 -1
  37. data/examples/i18n/pl/features/step_definitions/calculator_steps.rb +6 -1
  38. data/examples/i18n/pl/features/support/env.rb +6 -1
  39. data/examples/i18n/pt/features/support/env.rb +6 -1
  40. data/examples/i18n/ro/features/step_definitions/calculator_steps.rb +6 -1
  41. data/examples/i18n/ru/features/support/env.rb +6 -1
  42. data/examples/i18n/ru/lib/calculator.rb +2 -1
  43. data/examples/i18n/sk/features/step_definitions/calculator_steps.rb +6 -1
  44. data/examples/i18n/sr-Cyrl/features/support/env.rb +6 -1
  45. data/examples/i18n/sr-Latn/features/step_definitions/calculator_steps.rb +6 -1
  46. data/examples/i18n/sv/features/step_definitions/kalkulator_steps.rb +6 -1
  47. data/examples/i18n/tr/features/step_definitions/hesap_makinesi_adimlari.rb +6 -1
  48. data/examples/i18n/uk/features/support/env.rb +6 -1
  49. data/examples/i18n/uk/lib/calculator.rb +2 -1
  50. data/examples/i18n/uz/features/support/env.rb +6 -1
  51. data/examples/i18n/uz/lib/calculator.rb +2 -1
  52. data/examples/i18n/zh-CN/features/step_definitions/calculator_steps.rb +6 -1
  53. data/examples/i18n/zh-TW/features/step_definitions/calculator_steps.rb +6 -1
  54. data/examples/sinatra/features/support/env.rb +6 -1
  55. data/examples/tcl/features/support/env.rb +2 -1
  56. data/examples/watir/features/step_definitions/search_steps.rb +4 -3
  57. data/examples/watir/features/support/env.rb +5 -1
  58. data/features/docs/api/listen_for_events.feature +2 -2
  59. data/features/docs/cli/execute_with_tag_filter.feature +4 -2
  60. data/features/docs/defining_steps/ambiguous_steps.feature +89 -0
  61. data/features/docs/events/{test_case_starting_event.feature → test_case_started_event.feature} +3 -3
  62. data/features/docs/events/{test_run_starting_event.feature → test_run_started_event.feature} +5 -5
  63. data/features/docs/events/test_step_finished_event.feature +1 -1
  64. data/features/docs/events/{test_step_starting_event.feature → test_step_started_event.feature} +3 -3
  65. data/features/docs/extending_cucumber/custom_formatter.feature +5 -33
  66. data/features/docs/gherkin/outlines.feature +2 -4
  67. data/features/docs/writing_support_code/parameter_types.feature +12 -18
  68. data/features/lib/step_definitions/iso-8859-1_steps.rb +6 -3
  69. data/features/lib/support/fake_wire_server.rb +9 -1
  70. data/features/lib/support/parameter_types.rb +1 -4
  71. data/gem_tasks/fix_cr_lf.rake +17 -6
  72. data/lib/autotest/cucumber_mixin.rb +1 -1
  73. data/lib/cucumber/cli/configuration.rb +2 -2
  74. data/lib/cucumber/cli/options.rb +62 -41
  75. data/lib/cucumber/cli/profile_loader.rb +1 -1
  76. data/lib/cucumber/configuration.rb +3 -2
  77. data/lib/cucumber/deprecate.rb +2 -2
  78. data/lib/cucumber/events.rb +3 -3
  79. data/lib/cucumber/events/test_case_finished.rb +1 -1
  80. data/lib/cucumber/events/{test_case_starting.rb → test_case_started.rb} +1 -1
  81. data/lib/cucumber/events/{test_run_starting.rb → test_run_started.rb} +1 -1
  82. data/lib/cucumber/events/{test_step_starting.rb → test_step_started.rb} +1 -1
  83. data/lib/cucumber/filters.rb +1 -1
  84. data/lib/cucumber/filters/activate_steps.rb +6 -2
  85. data/lib/cucumber/filters/{broadcast_test_run_starting_event.rb → broadcast_test_run_started_event.rb} +2 -2
  86. data/lib/cucumber/formatter/console.rb +1 -1
  87. data/lib/cucumber/formatter/console_issues.rb +2 -2
  88. data/lib/cucumber/formatter/fail_fast.rb +1 -1
  89. data/lib/cucumber/formatter/html.rb +9 -10
  90. data/lib/cucumber/formatter/html_builder.rb +21 -11
  91. data/lib/cucumber/formatter/io.rb +1 -1
  92. data/lib/cucumber/formatter/json.rb +13 -12
  93. data/lib/cucumber/formatter/junit.rb +7 -7
  94. data/lib/cucumber/formatter/legacy_api/adapter.rb +30 -14
  95. data/lib/cucumber/formatter/legacy_api/ast.rb +10 -2
  96. data/lib/cucumber/formatter/progress.rb +2 -2
  97. data/lib/cucumber/formatter/rerun.rb +1 -1
  98. data/lib/cucumber/formatter/summary.rb +1 -1
  99. data/lib/cucumber/glue/dsl.rb +11 -25
  100. data/lib/cucumber/glue/proto_world.rb +0 -5
  101. data/lib/cucumber/hooks.rb +4 -4
  102. data/lib/cucumber/multiline_argument.rb +3 -11
  103. data/lib/cucumber/multiline_argument/data_table.rb +5 -3
  104. data/lib/cucumber/project_initializer.rb +1 -1
  105. data/lib/cucumber/rake/task.rb +8 -4
  106. data/lib/cucumber/runtime.rb +2 -2
  107. data/lib/cucumber/runtime/support_code.rb +1 -1
  108. data/lib/cucumber/runtime/user_interface.rb +5 -5
  109. data/lib/cucumber/step_match.rb +13 -0
  110. data/lib/cucumber/version +1 -1
  111. data/scripts/{update-history → update-changelog} +14 -11
  112. data/spec/cucumber/cli/configuration_spec.rb +13 -1
  113. data/spec/cucumber/cli/options_spec.rb +1 -1
  114. data/spec/cucumber/filters/activate_steps_spec.rb +4 -4
  115. data/spec/cucumber/formatter/fail_fast_spec.rb +1 -1
  116. data/spec/cucumber/formatter/html_spec.rb +1 -1
  117. data/spec/cucumber/formatter/json_spec.rb +26 -51
  118. data/spec/cucumber/formatter/junit_spec.rb +4 -4
  119. data/spec/cucumber/formatter/legacy_api/adapter_spec.rb +86 -98
  120. data/spec/cucumber/formatter/pretty_spec.rb +0 -13
  121. data/spec/cucumber/glue/snippet_spec.rb +2 -2
  122. data/spec/cucumber/hooks_spec.rb +2 -2
  123. data/spec/cucumber/multiline_argument/data_table_spec.rb +10 -5
  124. data/spec/cucumber/rake/forked_spec.rb +15 -11
  125. data/spec/cucumber/world/pending_spec.rb +1 -1
  126. data/spec/support/standard_step_actions.rb +1 -1
  127. metadata +25 -25
  128. data/features/docs/formatters/formatter_step_file_colon_line.feature +0 -44
@@ -43,7 +43,7 @@ module Cucumber
43
43
  "
44
44
  class Junit
45
45
  def before_step(step)
46
- return unless step.name.match('a passing ctrl scenario')
46
+ return unless step.text.match('a passing ctrl scenario')
47
47
  Interceptor::Pipe.unwrap! :stdout
48
48
  @fake_io = $stdout = StringIO.new
49
49
  $stdout.sync = true
@@ -51,7 +51,7 @@ module Cucumber
51
51
  end
52
52
 
53
53
  def after_step(step)
54
- return unless step.name.match('a passing ctrl scenario')
54
+ return unless step.text.match('a passing ctrl scenario')
55
55
  @interceptedout.write("boo\b\cx\e\a\f boo ")
56
56
  $stdout = STDOUT
57
57
  @fake_io.close
@@ -116,8 +116,8 @@ module Cucumber
116
116
  Given a passing scenario
117
117
  }, File.join('features', 'some', 'path', 'spec.feature')
118
118
 
119
- it 'writes the filename including the subdirectory' do
120
- expect(@formatter.written_files.keys.first).to eq File.join('', 'TEST-features-some-path-spec.xml')
119
+ it 'writes the filename with absolute path' do
120
+ expect(@formatter.written_files.keys.first).to eq File.absolute_path('TEST-features-some-path-spec.xml')
121
121
  end
122
122
  end
123
123
 
@@ -111,6 +111,7 @@ module Cucumber
111
111
  runner = Core::Test::Runner.new(events)
112
112
  compile gherkin_docs, runner, default_filters
113
113
  events.test_run_finished
114
+ # rubocop:disable AlignArray
114
115
  expect( formatter.legacy_messages ).to eq [
115
116
  :before_features,
116
117
  :before_feature,
@@ -149,66 +150,7 @@ module Cucumber
149
150
  :after_feature,
150
151
  :after_features
151
152
  ]
152
- end
153
-
154
- it 'a scenario with no steps' do
155
- execute_gherkin do
156
- feature do
157
- scenario
158
- end
159
- end
160
-
161
- expect( formatter.legacy_messages ).to eq [
162
- :before_features,
163
- :before_feature,
164
- :before_tags,
165
- :after_tags,
166
- :feature_name,
167
- :before_feature_element,
168
- :before_tags,
169
- :after_tags,
170
- :scenario_name,
171
- :after_feature_element,
172
- :after_feature,
173
- :after_features
174
- ]
175
- end
176
-
177
- it 'a scenario with no steps coming after another scenario' do
178
- execute_gherkin do
179
- feature do
180
- scenario do
181
- step 'passing'
182
- end
183
- scenario
184
- end
185
- end
186
- expect( formatter.legacy_messages ).to eq [
187
- :before_features,
188
- :before_feature,
189
- :before_tags,
190
- :after_tags,
191
- :feature_name,
192
- :before_feature_element,
193
- :before_tags,
194
- :after_tags,
195
- :scenario_name,
196
- :before_steps,
197
- :before_step,
198
- :before_step_result,
199
- :step_name,
200
- :after_step_result,
201
- :after_step,
202
- :after_steps,
203
- :after_feature_element,
204
- :before_feature_element,
205
- :before_tags,
206
- :after_tags,
207
- :scenario_name,
208
- :after_feature_element,
209
- :after_feature,
210
- :after_features
211
- ]
153
+ # rubocop:enable AlignArray
212
154
  end
213
155
 
214
156
  it 'a scenario with one step' do
@@ -219,6 +161,8 @@ module Cucumber
219
161
  end
220
162
  end
221
163
  end
164
+
165
+ # rubocop:disable AlignArray
222
166
  expect( formatter.legacy_messages ).to eq [
223
167
  :before_features,
224
168
  :before_feature,
@@ -240,6 +184,7 @@ module Cucumber
240
184
  :after_feature,
241
185
  :after_features
242
186
  ]
187
+ # rubocop:enable AlignArray
243
188
  end
244
189
 
245
190
  it 'a scenario with two steps, one of them failing' do
@@ -291,6 +236,8 @@ module Cucumber
291
236
  end
292
237
  end
293
238
  end
239
+
240
+ # rubocop:disable AlignArray
294
241
  expect( formatter.legacy_messages ).to eq [
295
242
  :before_features,
296
243
  :before_feature,
@@ -324,6 +271,7 @@ module Cucumber
324
271
  :after_feature,
325
272
  :after_features
326
273
  ]
274
+ # rubocop:enable AlignArray
327
275
  end
328
276
 
329
277
  it 'a feature with a background and an empty scenario' do
@@ -335,6 +283,8 @@ module Cucumber
335
283
  scenario
336
284
  end
337
285
  end
286
+
287
+ # rubocop:disable AlignArray
338
288
  expect( formatter.legacy_messages ).to eq [
339
289
  :before_features,
340
290
  :before_feature,
@@ -359,6 +309,7 @@ module Cucumber
359
309
  :after_feature,
360
310
  :after_features
361
311
  ]
312
+ # rubocop:enable AlignArray
362
313
  end
363
314
 
364
315
  it 'a feature with a background and two scenarios' do
@@ -375,6 +326,8 @@ module Cucumber
375
326
  end
376
327
  end
377
328
  end
329
+
330
+ # rubocop:disable AlignArray
378
331
  expect( formatter.legacy_messages ).to eq [
379
332
  :before_features,
380
333
  :before_feature,
@@ -418,6 +371,7 @@ module Cucumber
418
371
  :after_feature,
419
372
  :after_features
420
373
  ]
374
+ # rubocop:enable AlignArray
421
375
  end
422
376
 
423
377
  it 'a feature with a background and one scenario and one scenario outline' do
@@ -438,6 +392,8 @@ module Cucumber
438
392
  end
439
393
  end
440
394
  end
395
+
396
+ # rubocop:disable AlignArray
441
397
  expect( formatter.legacy_messages ).to eq [
442
398
  :before_features,
443
399
  :before_feature,
@@ -500,6 +456,7 @@ module Cucumber
500
456
  :after_feature,
501
457
  :after_features
502
458
  ]
459
+ # rubocop:enable AlignArray
503
460
  end
504
461
 
505
462
  it 'a feature with a background and one scenario outline and one scenario' do
@@ -520,6 +477,8 @@ module Cucumber
520
477
  end
521
478
  end
522
479
  end
480
+
481
+ # rubocop:disable AlignArray
523
482
  expect( formatter.legacy_messages ).to eq [
524
483
  :before_features,
525
484
  :before_feature,
@@ -582,6 +541,7 @@ module Cucumber
582
541
  :after_feature,
583
542
  :after_features
584
543
  ]
544
+ # rubocop:enable AlignArray
585
545
  end
586
546
 
587
547
  it 'a feature with a background and two scenario outlines' do
@@ -606,6 +566,8 @@ module Cucumber
606
566
  end
607
567
  end
608
568
  end
569
+
570
+ # rubocop:disable AlignArray
609
571
  expect( formatter.legacy_messages ).to eq [
610
572
  :before_features,
611
573
  :before_feature,
@@ -687,6 +649,7 @@ module Cucumber
687
649
  :after_feature,
688
650
  :after_features
689
651
  ]
652
+ # rubocop:enable AlignArray
690
653
  end
691
654
 
692
655
  it 'a feature with a background and one scenario outline with two rows' do
@@ -705,6 +668,8 @@ module Cucumber
705
668
  end
706
669
  end
707
670
  end
671
+
672
+ # rubocop:disable AlignArray
708
673
  expect( formatter.legacy_messages ).to eq [
709
674
  :before_features,
710
675
  :before_feature,
@@ -760,6 +725,7 @@ module Cucumber
760
725
  :after_feature,
761
726
  :after_features
762
727
  ]
728
+ # rubocop:enable AlignArray
763
729
  end
764
730
 
765
731
  it 'a feature with a background and one scenario outline with two examples tables' do
@@ -781,6 +747,8 @@ module Cucumber
781
747
  end
782
748
  end
783
749
  end
750
+
751
+ # rubocop:disable AlignArray
784
752
  expect( formatter.legacy_messages ).to eq [
785
753
  :before_features,
786
754
  :before_feature,
@@ -848,6 +816,7 @@ module Cucumber
848
816
  :after_feature,
849
817
  :after_features
850
818
  ]
819
+ # rubocop:enable AlignArray
851
820
  end
852
821
 
853
822
  it 'a feature with a background with two steps' do
@@ -862,6 +831,8 @@ module Cucumber
862
831
  end
863
832
  end
864
833
  end
834
+
835
+ # rubocop:disable AlignArray
865
836
  expect( formatter.legacy_messages ).to eq [
866
837
  :before_features,
867
838
  :before_feature,
@@ -898,6 +869,7 @@ module Cucumber
898
869
  :after_feature,
899
870
  :after_features
900
871
  ]
872
+ # rubocop:enable AlignArray
901
873
  end
902
874
 
903
875
  it 'a feature with a background' do
@@ -956,6 +928,8 @@ module Cucumber
956
928
  end
957
929
  end
958
930
  end
931
+
932
+ # rubocop:disable AlignArray
959
933
  expect( formatter.legacy_messages ).to eq [
960
934
  :before_features,
961
935
  :before_feature,
@@ -996,6 +970,7 @@ module Cucumber
996
970
  :after_feature,
997
971
  :after_features
998
972
  ]
973
+ # rubocop:enable AlignArray
999
974
  end
1000
975
 
1001
976
  it 'scenario outline after scenario' do
@@ -1013,6 +988,8 @@ module Cucumber
1013
988
  end
1014
989
  end
1015
990
  end
991
+
992
+ # rubocop:disable AlignArray
1016
993
  expect( formatter.legacy_messages ).to eq [
1017
994
  :before_features,
1018
995
  :before_feature,
@@ -1065,6 +1042,7 @@ module Cucumber
1065
1042
  :after_feature,
1066
1043
  :after_features
1067
1044
  ]
1045
+ # rubocop:enable AlignArray
1068
1046
  end
1069
1047
 
1070
1048
  it 'scenario outline before scenario' do
@@ -1082,6 +1060,8 @@ module Cucumber
1082
1060
  end
1083
1061
  end
1084
1062
  end
1063
+
1064
+ # rubocop:disable AlignArray
1085
1065
  expect( formatter.legacy_messages ).to eq [
1086
1066
  :before_features,
1087
1067
  :before_feature,
@@ -1134,6 +1114,7 @@ module Cucumber
1134
1114
  :after_feature,
1135
1115
  :after_features
1136
1116
  ]
1117
+ # rubocop:enable AlignArray
1137
1118
  end
1138
1119
 
1139
1120
  it 'scenario outline two rows' do
@@ -1149,6 +1130,8 @@ module Cucumber
1149
1130
  end
1150
1131
  end
1151
1132
  end
1133
+
1134
+ # rubocop:disable AlignArray
1152
1135
  expect( formatter.legacy_messages ).to eq [
1153
1136
  :before_features,
1154
1137
  :before_feature,
@@ -1194,6 +1177,7 @@ module Cucumber
1194
1177
  :after_feature,
1195
1178
  :after_features
1196
1179
  ]
1180
+ # rubocop:enable AlignArray
1197
1181
  end
1198
1182
 
1199
1183
  it 'scenario outline two examples tables' do
@@ -1212,6 +1196,8 @@ module Cucumber
1212
1196
  end
1213
1197
  end
1214
1198
  end
1199
+
1200
+ # rubocop:disable AlignArray
1215
1201
  expect( formatter.legacy_messages ).to eq [
1216
1202
  :before_features,
1217
1203
  :before_feature,
@@ -1269,6 +1255,7 @@ module Cucumber
1269
1255
  :after_feature,
1270
1256
  :after_features
1271
1257
  ]
1258
+ # rubocop:enable AlignArray
1272
1259
  end
1273
1260
 
1274
1261
  it 'two scenario outline' do
@@ -1290,6 +1277,8 @@ module Cucumber
1290
1277
  end
1291
1278
  end
1292
1279
  end
1280
+
1281
+ # rubocop:disable AlignArray
1293
1282
  expect( formatter.legacy_messages ).to eq [
1294
1283
  :before_features,
1295
1284
  :before_feature,
@@ -1361,6 +1350,7 @@ module Cucumber
1361
1350
  :after_feature,
1362
1351
  :after_features
1363
1352
  ]
1353
+ # rubocop:enable AlignArray
1364
1354
  end
1365
1355
 
1366
1356
  it 'failing scenario outline' do
@@ -1375,6 +1365,8 @@ module Cucumber
1375
1365
  end
1376
1366
  end
1377
1367
  end
1368
+
1369
+ # rubocop:disable AlignArray
1378
1370
  expect( formatter.legacy_messages ).to eq [
1379
1371
  :before_features,
1380
1372
  :before_feature,
@@ -1415,6 +1407,7 @@ module Cucumber
1415
1407
  :after_feature,
1416
1408
  :after_features
1417
1409
  ]
1410
+ # rubocop:enable AlignArray
1418
1411
  end
1419
1412
 
1420
1413
  it 'a feature with a failing background and two scenarios' do
@@ -1431,6 +1424,8 @@ module Cucumber
1431
1424
  end
1432
1425
  end
1433
1426
  end
1427
+
1428
+ # rubocop:disable AlignArray
1434
1429
  expect( formatter.legacy_messages ).to eq [
1435
1430
  :before_features,
1436
1431
  :before_feature,
@@ -1475,6 +1470,7 @@ module Cucumber
1475
1470
  :after_feature,
1476
1471
  :after_features
1477
1472
  ]
1473
+ # rubocop:enable AlignArray
1478
1474
  end
1479
1475
 
1480
1476
  context 'in expand mode' do
@@ -1494,6 +1490,8 @@ module Cucumber
1494
1490
  end
1495
1491
  end
1496
1492
  end
1493
+
1494
+ # rubocop:disable AlignArray
1497
1495
  expect( formatter.legacy_messages ).to eq [
1498
1496
  :before_features,
1499
1497
  :before_feature,
@@ -1536,6 +1534,7 @@ module Cucumber
1536
1534
  :after_feature,
1537
1535
  :after_features
1538
1536
  ]
1537
+ # rubocop:enable AlignArray
1539
1538
  end
1540
1539
  end
1541
1540
 
@@ -1561,6 +1560,8 @@ module Cucumber
1561
1560
  end
1562
1561
  end
1563
1562
  end
1563
+
1564
+ # rubocop:disable AlignArray
1564
1565
  expect( formatter.legacy_messages ).to eq([
1565
1566
  :before_features,
1566
1567
  :before_feature,
@@ -1582,7 +1583,8 @@ module Cucumber
1582
1583
  :after_feature_element,
1583
1584
  :after_feature,
1584
1585
  :after_features
1585
- ])
1586
+ ])
1587
+ # rubocop:enable AlignArray
1586
1588
  end
1587
1589
  end
1588
1590
 
@@ -1608,6 +1610,7 @@ module Cucumber
1608
1610
  end
1609
1611
  end
1610
1612
 
1613
+ # rubocop:disable AlignArray
1611
1614
  expect( formatter.legacy_messages ).to eq([
1612
1615
  :before_features,
1613
1616
  :before_feature,
@@ -1629,7 +1632,8 @@ module Cucumber
1629
1632
  :after_feature_element,
1630
1633
  :after_feature,
1631
1634
  :after_features
1632
- ])
1635
+ ])
1636
+ # rubocop:enable AlignArray
1633
1637
  end
1634
1638
 
1635
1639
  it 'prints the exception after the background name' do
@@ -1649,6 +1653,7 @@ module Cucumber
1649
1653
  end
1650
1654
  end
1651
1655
 
1656
+ # rubocop:disable AlignArray
1652
1657
  expect( formatter.legacy_messages ).to eq([
1653
1658
  :before_features,
1654
1659
  :before_feature,
@@ -1680,7 +1685,8 @@ module Cucumber
1680
1685
  :after_feature_element,
1681
1686
  :after_feature,
1682
1687
  :after_features
1683
- ])
1688
+ ])
1689
+ # rubocop:enable AlignArray
1684
1690
  end
1685
1691
 
1686
1692
 
@@ -1702,6 +1708,7 @@ module Cucumber
1702
1708
  end
1703
1709
  end
1704
1710
 
1711
+ # rubocop:disable AlignArray
1705
1712
  expect( formatter.legacy_messages ).to eq([
1706
1713
  :before_features,
1707
1714
  :before_feature,
@@ -1743,6 +1750,7 @@ module Cucumber
1743
1750
  :after_feature,
1744
1751
  :after_features
1745
1752
  ])
1753
+ # rubocop:enable AlignArray
1746
1754
  end
1747
1755
  end
1748
1756
 
@@ -1771,6 +1779,7 @@ module Cucumber
1771
1779
  end
1772
1780
  end
1773
1781
 
1782
+ # rubocop:disable AlignArray
1774
1783
  expect( formatter.legacy_messages ).to eq([
1775
1784
  :before_features,
1776
1785
  :before_feature,
@@ -1792,7 +1801,8 @@ module Cucumber
1792
1801
  :after_feature_element,
1793
1802
  :after_feature,
1794
1803
  :after_features
1795
- ])
1804
+ ])
1805
+ # rubocop:enable AlignArray
1796
1806
  end
1797
1807
  end
1798
1808
 
@@ -1819,6 +1829,7 @@ module Cucumber
1819
1829
  end
1820
1830
  end
1821
1831
 
1832
+ # rubocop:disable AlignArray
1822
1833
  expect( formatter.legacy_messages ).to eq([
1823
1834
  :before_features,
1824
1835
  :before_feature,
@@ -1841,6 +1852,7 @@ module Cucumber
1841
1852
  :after_feature,
1842
1853
  :after_features
1843
1854
  ])
1855
+ # rubocop:enable AlignArray
1844
1856
  end
1845
1857
 
1846
1858
  it 'prints the exception after the examples table row' do
@@ -1861,6 +1873,7 @@ module Cucumber
1861
1873
  end
1862
1874
  end
1863
1875
 
1876
+ # rubocop:disable AlignArray
1864
1877
  expect( formatter.legacy_messages ).to eq([
1865
1878
  :before_features,
1866
1879
  :before_feature,
@@ -1902,6 +1915,7 @@ module Cucumber
1902
1915
  :after_feature,
1903
1916
  :after_features
1904
1917
  ])
1918
+ # rubocop:enable AlignArray
1905
1919
  end
1906
1920
  end
1907
1921
 
@@ -1928,6 +1942,7 @@ module Cucumber
1928
1942
  end
1929
1943
  end
1930
1944
 
1945
+ # rubocop:disable AlignArray
1931
1946
  expect( formatter.legacy_messages ).to eq([
1932
1947
  :before_features,
1933
1948
  :before_feature,
@@ -1950,38 +1965,7 @@ module Cucumber
1950
1965
  :after_feature,
1951
1966
  :after_features
1952
1967
  ])
1953
- end
1954
- end
1955
-
1956
- context 'with an exception in an after hook but no steps' do
1957
- it 'prints the exception after the scenario name' do
1958
- filters = [
1959
- Filters::ActivateSteps.new(step_match_search, runtime.configuration),
1960
- Filters::ApplyAfterHooks.new(FailingAfterHook.new),
1961
- AddBeforeAndAfterHooks.new
1962
- ]
1963
- execute_gherkin(filters) do
1964
- feature do
1965
- scenario do
1966
- end
1967
- end
1968
- end
1969
-
1970
- expect( formatter.legacy_messages ).to eq([
1971
- :before_features,
1972
- :before_feature,
1973
- :before_tags,
1974
- :after_tags,
1975
- :feature_name,
1976
- :before_feature_element,
1977
- :before_tags,
1978
- :after_tags,
1979
- :scenario_name,
1980
- :exception,
1981
- :after_feature_element,
1982
- :after_feature,
1983
- :after_features
1984
- ])
1968
+ # rubocop:enable AlignArray
1985
1969
  end
1986
1970
  end
1987
1971
 
@@ -2003,10 +1987,12 @@ module Cucumber
2003
1987
  execute_gherkin(filters) do
2004
1988
  feature do
2005
1989
  scenario do
1990
+ step 'passing'
2006
1991
  end
2007
1992
  end
2008
1993
  end
2009
1994
 
1995
+ # rubocop:disable AlignArray
2010
1996
  expect( formatter.legacy_messages ).to eq([
2011
1997
  :before_features,
2012
1998
  :before_feature,
@@ -2022,6 +2008,7 @@ module Cucumber
2022
2008
  :after_feature,
2023
2009
  :after_features
2024
2010
  ])
2011
+ # rubocop:enable AlignArray
2025
2012
  end
2026
2013
  end
2027
2014
 
@@ -2047,7 +2034,7 @@ module Cucumber
2047
2034
  end
2048
2035
  end
2049
2036
  end
2050
-
2037
+ # rubocop:disable AlignArray
2051
2038
  expect( formatter.legacy_messages ).to eq([
2052
2039
  :before_features,
2053
2040
  :before_feature,
@@ -2070,6 +2057,7 @@ module Cucumber
2070
2057
  :after_feature,
2071
2058
  :after_features
2072
2059
  ])
2060
+ # rubocop:enable AlignArray
2073
2061
  end
2074
2062
  end
2075
2063
  end
@@ -2126,7 +2114,7 @@ module Cucumber
2126
2114
  end
2127
2115
 
2128
2116
  context 'in strict mode' do
2129
- let(:runtime) { Runtime.new strict: true }
2117
+ let(:runtime) { Runtime.new strict: Cucumber::Core::Test::Result::StrictConfiguration.new([:undefined]) }
2130
2118
 
2131
2119
  it 'passes an exception to the formatter for undefined steps' do
2132
2120
  expect( formatter ).to receive(:exception) do |exception|