kosmas58-cucumber 0.3.100 → 0.3.102

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. data/History.txt +53 -0
  2. data/Manifest.txt +9 -4
  3. data/config/hoe.rb +2 -2
  4. data/examples/pure_java/README.textile +2 -2
  5. data/features/cucumber_cli.feature +13 -11
  6. data/features/custom_formatter.feature +38 -3
  7. data/features/default_snippets.feature +42 -0
  8. data/features/html_formatter/a.html +7 -7
  9. data/features/negative_tagged_hooks.feature +61 -0
  10. data/features/step_definitions/cucumber_steps.rb +3 -3
  11. data/features/steps_formatter.feature +2 -1
  12. data/features/support/env.rb +1 -1
  13. data/features/transform.feature +100 -0
  14. data/lib/cucumber/ast/feature.rb +4 -0
  15. data/lib/cucumber/ast/feature_element.rb +49 -42
  16. data/lib/cucumber/ast/step_invocation.rb +1 -1
  17. data/lib/cucumber/ast/tags.rb +28 -4
  18. data/lib/cucumber/cli/drb_client.rb +7 -1
  19. data/lib/cucumber/cli/main.rb +5 -3
  20. data/lib/cucumber/cli/options.rb +20 -25
  21. data/lib/cucumber/constantize.rb +8 -2
  22. data/lib/cucumber/core_ext/instance_exec.rb +1 -0
  23. data/lib/cucumber/core_ext/string.rb +0 -32
  24. data/lib/cucumber/filter.rb +2 -12
  25. data/lib/cucumber/formatter/console.rb +21 -21
  26. data/lib/cucumber/formatter/html.rb +2 -2
  27. data/lib/cucumber/formatter/pdf.rb +217 -0
  28. data/lib/cucumber/formatter/pretty.rb +1 -1
  29. data/lib/cucumber/formatter/steps.rb +4 -4
  30. data/lib/cucumber/formatter/usage.rb +3 -3
  31. data/lib/cucumber/language_support/language_methods.rb +19 -2
  32. data/lib/cucumber/language_support/step_definition_methods.rb +4 -27
  33. data/lib/cucumber/parser/feature.rb +13 -50
  34. data/lib/cucumber/parser/feature.tt +13 -47
  35. data/lib/cucumber/parser/natural_language.rb +1 -1
  36. data/lib/cucumber/rails/action_controller.rb +33 -0
  37. data/lib/cucumber/rails/active_record.rb +40 -0
  38. data/lib/cucumber/rails/rspec.rb +1 -1
  39. data/lib/cucumber/rails/test_unit.rb +9 -0
  40. data/lib/cucumber/rails/world.rb +7 -78
  41. data/lib/cucumber/rb_support/rb_dsl.rb +14 -3
  42. data/lib/cucumber/rb_support/rb_group.rb +32 -0
  43. data/lib/cucumber/rb_support/rb_language.rb +8 -2
  44. data/lib/cucumber/rb_support/rb_step_definition.rb +18 -10
  45. data/lib/cucumber/rb_support/rb_transform.rb +35 -0
  46. data/lib/cucumber/rb_support/rb_world.rb +7 -1
  47. data/lib/cucumber/step_match.rb +47 -7
  48. data/lib/cucumber/step_mother.rb +8 -4
  49. data/lib/cucumber/version.rb +1 -1
  50. data/rails_generators/cucumber/templates/cucumber_environment.rb +2 -2
  51. data/rails_generators/cucumber/templates/de/webrat_steps.rb +48 -4
  52. data/rails_generators/cucumber/templates/en/webrat_steps.rb +50 -8
  53. data/rails_generators/cucumber/templates/env.rb +15 -8
  54. data/spec/cucumber/ast/feature_element_spec.rb +24 -23
  55. data/spec/cucumber/ast/scenario_outline_spec.rb +1 -1
  56. data/spec/cucumber/cli/options_spec.rb +5 -14
  57. data/spec/cucumber/parser/feature_parser_spec.rb +6 -6
  58. data/spec/cucumber/step_mother_spec.rb +98 -0
  59. metadata +15 -9
  60. data/spec/cucumber/core_ext/string_spec.rb +0 -43
  61. data/spec/cucumber/rails/stubs/mini_rails.rb +0 -18
  62. data/spec/cucumber/rails/stubs/test_help.rb +0 -1
  63. data/spec/cucumber/rails/world_spec.rb +0 -16
data/History.txt CHANGED
@@ -1,3 +1,56 @@
1
+ == (In Git)
2
+
3
+ This release gives you back some of the control over the Rails environment that was accidentally taken away from you in the
4
+ previous release.
5
+
6
+ Using this release on a Rails project requires a rerun of script/generate cucumber.
7
+
8
+ === New Features
9
+ * Added a new @no-txn tag to selectively turn off transactions for a particluar scenario.
10
+ * Added back a way to globally turn off transactions.
11
+ * Renamed @allow_rescue tag to @allow-rescue.
12
+
13
+ == 2009-09-22
14
+
15
+ This release has some changes in the Rails support, so make sure you run "script/generate cucumber" after you upgrade.
16
+ Other noteworthy new features are improved Hook, tags and Transform support, and as always - several smaler bug fixes.
17
+
18
+ === New Features
19
+ * Added new internal API for Regexp and groups, allowing other programming languages to leverage native regexps. (Aslak Hellesøy)
20
+ * New @allow_rescue tag for Rails scenarios. Causes exceptions raised in actions to be caught by rails and not bubble up to Cucumber (Aslak Hellesøy)
21
+ * Negative tags can now be used in hooks, just like the command line's --tags option: Before('~@yarr') - will run for all scenarios that *don't* have the @yarr tag. (Aslak Hellesøy)
22
+ * Transform has current "World" scope (Larry Diehl)
23
+ * Other Transforms can be reused by calling Transform with a string inside of another Transform definition (Larry Diehl)
24
+ * Execute "After" hooks in reverse order of declaration for better behavior with dependent blocks and to mimic the behavior of at_exit (David Waite)
25
+
26
+ === Bugfixes
27
+ * features/support/env.rb runs commands twice (bugfix cuts total time by almost 50% w00t) (#452 Jim Meyer)
28
+ * Problems adding custom formatters to features/support. (features/support is added to $LOAD_PATH) (#449 Aslak Hellesøy)
29
+ * Some options set in cucumber.yml profiles are ignored (#446 Leonard CHIN)
30
+ * Missing step_definition snippets not properly displayed (#433 Aslak Hellesøy)
31
+ * rspec-rails, :lib => false (#447 David Chelimsky)
32
+ * Cucumber with Spork breaks on OS X Snow Leopard (#431 David Chelimsky)
33
+
34
+ === Changed Features
35
+ * Tag names passed on the command line *always* have to use the @ sign. --tags foo or --tags ~bar won't work. Use --tags @foo or --tags ~@bar (Aslak Hellesøy)
36
+
37
+ === Removed features
38
+ * The Cucumber::Rails.bypass_rescue no longer exists. Errors will always bubble up, unless you use the new @allow_rescue tag. (Aslak Hellesøy)
39
+ * The Cucumber::Rails.use_transactional_fixtures no longer exists. Transactional fixtures are always enabled for the cucumber environment. (Aslak Hellesøy)
40
+
41
+ == 0.3.101 2009-09-15
42
+
43
+ Two exciting things in this release. Step Argument Transforms and a PDF formatter you can use to send
44
+ your features to your customer for review!
45
+
46
+ === New Features
47
+ * New pdf formatter (#425 Mads Buus)
48
+ * Step Argument Transforms: These let you use the Transform method to register regular expressions
49
+ to catch and transform/coerce arguments before they are yielded to step definitions:
50
+ http://wiki.github.com/aslakhellesoy/cucumber/step-argument-transforms (Larry Diehl & Dave Astels)
51
+ * Adding webrat steps for asserting content does or does not exist within a particular element
52
+ (using webrat's within method) (Kieran Pilkington)
53
+
1
54
  == 0.3.100 2009-09-09
2
55
 
3
56
  The JavaZone release!
data/Manifest.txt CHANGED
@@ -268,6 +268,7 @@ features/cucumber_cli.feature
268
268
  features/cucumber_cli_diff_disabled.feature
269
269
  features/cucumber_cli_outlines.feature
270
270
  features/custom_formatter.feature
271
+ features/default_snippets.feature
271
272
  features/drb_server_integration.feature
272
273
  features/exception_in_after_block.feature
273
274
  features/exception_in_after_step_block.feature
@@ -279,6 +280,7 @@ features/html_formatter/a.html
279
280
  features/junit_formatter.feature
280
281
  features/language_from_header.feature
281
282
  features/multiline_names.feature
283
+ features/negative_tagged_hooks.feature
282
284
  features/post_configuration_hook.feature
283
285
  features/profiles.feature
284
286
  features/rake_task.feature
@@ -289,6 +291,7 @@ features/step_definitions/extra_steps.rb
289
291
  features/steps_formatter.feature
290
292
  features/support/env.rb
291
293
  features/table_diffing.feature
294
+ features/transform.feature
292
295
  features/unicode_table.feature
293
296
  features/usage.feature
294
297
  features/work_in_progress.feature
@@ -349,6 +352,7 @@ lib/cucumber/formatter/duration.rb
349
352
  lib/cucumber/formatter/html.rb
350
353
  lib/cucumber/formatter/junit.rb
351
354
  lib/cucumber/formatter/ordered_xml_markup.rb
355
+ lib/cucumber/formatter/pdf.rb
352
356
  lib/cucumber/formatter/pretty.rb
353
357
  lib/cucumber/formatter/profile.rb
354
358
  lib/cucumber/formatter/progress.rb
@@ -374,13 +378,18 @@ lib/cucumber/platform.rb
374
378
  lib/cucumber/py_support/py_dsl.py
375
379
  lib/cucumber/py_support/py_language.py
376
380
  lib/cucumber/py_support/py_language.rb
381
+ lib/cucumber/rails/action_controller.rb
382
+ lib/cucumber/rails/active_record.rb
377
383
  lib/cucumber/rails/rspec.rb
384
+ lib/cucumber/rails/test_unit.rb
378
385
  lib/cucumber/rails/world.rb
379
386
  lib/cucumber/rake/task.rb
380
387
  lib/cucumber/rb_support/rb_dsl.rb
388
+ lib/cucumber/rb_support/rb_group.rb
381
389
  lib/cucumber/rb_support/rb_hook.rb
382
390
  lib/cucumber/rb_support/rb_language.rb
383
391
  lib/cucumber/rb_support/rb_step_definition.rb
392
+ lib/cucumber/rb_support/rb_transform.rb
384
393
  lib/cucumber/rb_support/rb_world.rb
385
394
  lib/cucumber/rspec_neuter.rb
386
395
  lib/cucumber/step_match.rb
@@ -420,7 +429,6 @@ spec/cucumber/cli/main_spec.rb
420
429
  spec/cucumber/cli/options_spec.rb
421
430
  spec/cucumber/cli/profile_loader_spec.rb
422
431
  spec/cucumber/core_ext/proc_spec.rb
423
- spec/cucumber/core_ext/string_spec.rb
424
432
  spec/cucumber/formatter/ansicolor_spec.rb
425
433
  spec/cucumber/formatter/color_io_spec.rb
426
434
  spec/cucumber/formatter/duration_spec.rb
@@ -428,9 +436,6 @@ spec/cucumber/formatter/html_spec.rb
428
436
  spec/cucumber/formatter/progress_spec.rb
429
437
  spec/cucumber/parser/feature_parser_spec.rb
430
438
  spec/cucumber/parser/table_parser_spec.rb
431
- spec/cucumber/rails/stubs/mini_rails.rb
432
- spec/cucumber/rails/stubs/test_help.rb
433
- spec/cucumber/rails/world_spec.rb
434
439
  spec/cucumber/rb_support/rb_step_definition_spec.rb
435
440
  spec/cucumber/sell_cucumbers.feature
436
441
  spec/cucumber/step_mother_spec.rb
data/config/hoe.rb CHANGED
@@ -62,8 +62,8 @@ $hoe = Hoe.spec(GEM_NAME) do |p|
62
62
  #p.extra_deps = [] # An array of rubygem dependencies [name, version], e.g. [ ['active_support', '>= 1.3.1'] ]
63
63
  p.extra_deps = [
64
64
  ['term-ansicolor', '>= 1.0.3'],
65
- ['treetop', '>= 1.3.0'],
66
- ['polyglot', '>= 0.2.8'], # Don't really want polyglot, but it keeps breaking so we'll make people use something that works ok'ish
65
+ ['treetop', '>= 1.4.2'],
66
+ ['polyglot', '>= 0.2.9'], # Don't really want polyglot, but it keeps breaking so we'll make people use something that works ok'ish
67
67
  ['diff-lcs', '>= 1.1.2'],
68
68
  ['builder', '>= 2.1.2']
69
69
  ]
@@ -1,5 +1,5 @@
1
1
  h1. Cucumber with pure Java
2
2
 
3
- You can use Cucumber with step definitions in pure Java.
3
+ Nothing here in the Cucumber codebase, but check out "Cuke4Duke":http://wiki.github.com/aslakhellesoy/cuke4duke
4
4
 
5
- See http://github.com/aslakhellesoy/cucumber_java/tree/master
5
+ Cuke4Duke lets you write step definitions in Java, Groovy and an increasing number of languages that run on the JVM.
@@ -442,7 +442,7 @@ Feature: Cucumber command line
442
442
 
443
443
 
444
444
  Scenario: Run with a tag that exists on 2 scenarios
445
- When I run cucumber -q features --tags three
445
+ When I run cucumber -q features --tags @three
446
446
  Then it should pass with
447
447
  """
448
448
  # Feature comment
@@ -467,7 +467,7 @@ Feature: Cucumber command line
467
467
 
468
468
  @mri186
469
469
  Scenario: Run with a tag that exists on 1 feature
470
- When I run cucumber -q features --tags one
470
+ When I run cucumber -q features --tags @one
471
471
  Then it should fail with
472
472
  """
473
473
  # Feature comment
@@ -505,7 +505,7 @@ Feature: Cucumber command line
505
505
  """
506
506
 
507
507
  Scenario: Run with a negative tag
508
- When I run cucumber -q features/sample.feature --dry-run -t ~four
508
+ When I run cucumber -q features/sample.feature --dry-run --tags ~@four
509
509
  Then it should pass with
510
510
  """
511
511
  # Feature comment
@@ -528,8 +528,8 @@ Feature: Cucumber command line
528
528
 
529
529
  """
530
530
 
531
- Scenario: Run with limited tag number
532
- When I run cucumber -q features/tags_sample.feature --dry-run -t sample_three:1
531
+ Scenario: Run with limited tag count, blowing it on scenario
532
+ When I run cucumber -q features/tags_sample.feature --dry-run --tags @sample_three:1
533
533
  Then it should fail with
534
534
  """
535
535
  @sample_one
@@ -550,15 +550,14 @@ Feature: Cucumber command line
550
550
  2 scenarios (2 undefined)
551
551
  2 steps (2 undefined)
552
552
 
553
- Failed due to exceeding the tag limit
554
- @sample_three occurred:2 limit:1
553
+ @sample_three occurred 2 times, but the limit was set to 1
555
554
  features/tags_sample.feature:9
556
555
  features/tags_sample.feature:16
557
556
 
558
557
  """
559
558
 
560
- Scenario: Run with a feature tag which has a limit
561
- When I run cucumber -q features/tags_sample.feature --dry-run -t sample_one:1
559
+ Scenario: Run with limited tag count, blowing it via feature inheritance
560
+ When I run cucumber -q features/tags_sample.feature --dry-run --tags @sample_one:1
562
561
  Then it should fail with
563
562
  """
564
563
  @sample_one
@@ -583,8 +582,7 @@ Feature: Cucumber command line
583
582
  3 scenarios (3 undefined)
584
583
  3 steps (3 undefined)
585
584
 
586
- Failed due to exceeding the tag limit
587
- @sample_one occurred:3 limit:1
585
+ @sample_one occurred 3 times, but the limit was set to 1
588
586
  features/tags_sample.feature:5
589
587
  features/tags_sample.feature:9
590
588
  features/tags_sample.feature:16
@@ -620,6 +618,10 @@ Feature: Cucumber command line
620
618
 
621
619
  """
622
620
 
621
+ Scenario: Generate PDF with pdf formatter
622
+ When I run cucumber --format pdf --out tmp/sample.pdf --dry-run features/sample.feature
623
+ Then "examples/self_test/tmp/sample.pdf" should match "Pages 2"
624
+
623
625
  Scenario: Run feature elements which match a name using -n
624
626
  When I run cucumber -n Pisang -q features/
625
627
  Then it should pass with
@@ -4,8 +4,43 @@ Feature: Custom Formatter
4
4
  When I run cucumber --format Cucumber::Formatter::TagCloud features
5
5
  Then it should fail with
6
6
  """
7
- | after_file | background_tagged_before_on_outline | four | lots | one | sample_four | sample_one | sample_three | sample_two | three | two |
8
- | 1 | 1 | 1 | 1 | 1 | 2 | 1 | 2 | 1 | 2 | 1 |
7
+ | @after_file | @background_tagged_before_on_outline | @four | @lots | @one | @sample_four | @sample_one | @sample_three | @sample_two | @three | @two |
8
+ | 1 | 1 | 1 | 1 | 1 | 2 | 1 | 2 | 1 | 2 | 1 |
9
9
 
10
10
  """
11
-
11
+
12
+ Scenario: my own formatter
13
+ Given a standard Cucumber project directory structure
14
+ And a file named "features/f.feature" with:
15
+ """
16
+ Feature: i'll use my own
17
+ Scenario: just print me
18
+ Given this step works
19
+ """
20
+ And a file named "features/step_definitions/steps.rb" with:
21
+ """
22
+ Given /^this step works$/ do
23
+ end
24
+ """
25
+ And a file named "features/support/ze/formator.rb" with:
26
+ """
27
+ module Ze
28
+ class Formator < Cucumber::Ast::Visitor
29
+ def initialize(step_mother, io, options)
30
+ super(step_mother)
31
+ @io = io
32
+ end
33
+
34
+ def visit_scenario_name(keyword, name, file_colon_line, source_indent)
35
+ @io.puts "$ #{name.upcase}"
36
+ end
37
+ end
38
+ end
39
+ """
40
+ When I run cucumber features/f.feature --format Ze::Formator
41
+ Then STDERR should be empty
42
+ Then it should pass with
43
+ """
44
+ $ JUST PRINT ME
45
+
46
+ """
@@ -0,0 +1,42 @@
1
+ Feature: Print snippets
2
+ In order to make it easier to implement step definitions
3
+ Developers should get a scaffolding for undefined step definitions
4
+
5
+ Scenario: Cucumber doesn't know what language, and defaults to Ruby
6
+ Given a standard Cucumber project directory structure
7
+ And a file named "features/x.feature" with:
8
+ """
9
+ Feature: X
10
+ Scenario: Y
11
+ Given Z
12
+ Given Q
13
+ """
14
+ When I run cucumber features
15
+ Then STDERR should be empty
16
+ And it should pass with
17
+ """
18
+ Feature: X
19
+
20
+ Scenario: Y # features/x.feature:2
21
+ Given Z # features/x.feature:3
22
+ Given Q # features/x.feature:4
23
+
24
+ 1 scenario (1 undefined)
25
+ 2 steps (2 undefined)
26
+
27
+ You can implement step definitions for undefined steps with these snippets:
28
+
29
+ Given /^Z$/ do
30
+ pending
31
+ end
32
+
33
+ Given /^Q$/ do
34
+ pending
35
+ end
36
+
37
+ If you want snippets in a different programming language, just make sure a file
38
+ with the appropriate file extension exists where cucumber looks for step definitions.
39
+
40
+
41
+ """
42
+
@@ -142,12 +142,12 @@ features/background/failing_background_after_success.feature:5:in `And '10' glob
142
142
  features/background/scenario_outline_failing_background.feature:4:in `Given failing without a table'</pre></li></ol></div><div class="scenario outline"><h3><span class="keyword">Scenario Outline:</span> <span class="val">failing background</span></h3><ol><li class="step skipped" id="features_background_scenario_outline_failing_background_feature_7"><div><span class="keyword">Then</span> <span class="step val">I should have '&lt;count&gt;' cukes</span></div></li></ol><div class="examples"><h4><span class="keyword">Examples:</span> <span class="val"></span></h4><table><tr id="row_9"><th class="val skipped_param" id="row_9_0">count</th></tr><tr id="row_10"><td class="val skipped" id="row_10_0">10</td></tr><tr><td class="failed" colspan="1"><pre>FAIL (RuntimeError)
143
143
  ./features/step_definitions/sample_steps.rb:2:in `flunker'
144
144
  ./features/step_definitions/sample_steps.rb:16:in `/^failing without a table$/'
145
- features/background/scenario_outline_failing_background.feature:4:in `Given failing without a table'</pre></td></tr></table></div></div><div class="scenario outline"><h3><span class="keyword">Scenario Outline:</span> <span class="val">another failing background</span></h3><ol><li class="step skipped" id="features_background_scenario_outline_failing_background_feature_13"><div><span class="keyword">Then</span> <span class="step val">I should have '&lt;count&gt;' cukes</span></div></li></ol><div class="examples"><h4><span class="keyword">Examples:</span> <span class="val"></span></h4><table><tr id="row_15"><th class="val skipped_param" id="row_15_0">count</th></tr><tr id="row_16"><td class="val skipped" id="row_16_0">10</td></tr></table></div></div></div><div class="feature"><h2><span class="val">Feature: Passing background with scenario outlines sample</span></h2><p class="narrative"></p><div class="background"><h3><span class="keyword">Background:</span> <span class="val"></span></h3><ol><li class="step passed" id="features_background_scenario_outline_passing_background_feature_4"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">10</span>' cukes</span></div></li></ol></div><div class="scenario outline"><h3><span class="keyword">Scenario Outline:</span> <span class="val">passing background</span></h3><ol><li class="step skipped" id="features_background_scenario_outline_passing_background_feature_7"><div><span class="keyword">Then</span> <span class="step val">I should have '&lt;count&gt;' cukes</span></div></li></ol><div class="examples"><h4><span class="keyword">Examples:</span> <span class="val"></span></h4><table><tr id="row_9"><th class="val skipped_param" id="row_9_0">count</th></tr><tr id="row_10"><td class="val passed" id="row_10_0">10</td></tr></table></div></div><div class="scenario outline"><h3><span class="keyword">Scenario Outline:</span> <span class="val">another passing background</span></h3><ol><li class="step skipped" id="features_background_scenario_outline_passing_background_feature_13"><div><span class="keyword">Then</span> <span class="step val">I should have '&lt;count&gt;' cukes</span></div></li></ol><div class="examples"><h4><span class="keyword">Examples:</span> <span class="val"></span></h4><table><tr id="row_15"><th class="val skipped_param" id="row_15_0">count</th></tr><tr id="row_16"><td class="val passed" id="row_16_0">10</td></tr></table></div></div></div><div class="feature"><h2><span class="val">Feature: Calling undefined step</span></h2><p class="narrative"></p><div class="scenario"><h3><span class="keyword">Scenario:</span> <span class="val">Call directly</span></h3><ol><li class="step undefined" id="features_call_undefined_step_from_step_def_feature_4"><div><span class="keyword">Given</span> <span class="step val">a step definition that calls an undefined step</span></div><pre class="undefined">Undefined step: "this does not exist" (Cucumber::Undefined)
145
+ features/background/scenario_outline_failing_background.feature:4:in `Given failing without a table'</pre></td></tr></table></div></div><div class="scenario outline"><h3><span class="keyword">Scenario Outline:</span> <span class="val">another failing background</span></h3><ol><li class="step skipped" id="features_background_scenario_outline_failing_background_feature_13"><div><span class="keyword">Then</span> <span class="step val">I should have '&lt;count&gt;' cukes</span></div></li></ol><div class="examples"><h4><span class="keyword">Examples:</span> <span class="val"></span></h4><table><tr id="row_15"><th class="val skipped_param" id="row_15_0">count</th></tr><tr id="row_16"><td class="val skipped" id="row_16_0">10</td></tr></table></div></div></div><div class="feature"><h2><span class="val">Feature: Passing background with scenario outlines sample</span></h2><p class="narrative"></p><div class="background"><h3><span class="keyword">Background:</span> <span class="val"></span></h3><ol><li class="step passed" id="features_background_scenario_outline_passing_background_feature_4"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">10</span>' cukes</span></div></li></ol></div><div class="scenario outline"><h3><span class="keyword">Scenario Outline:</span> <span class="val">passing background</span></h3><ol><li class="step skipped" id="features_background_scenario_outline_passing_background_feature_7"><div><span class="keyword">Then</span> <span class="step val">I should have '&lt;count&gt;' cukes</span></div></li></ol><div class="examples"><h4><span class="keyword">Examples:</span> <span class="val"></span></h4><table><tr id="row_9"><th class="val skipped_param" id="row_9_0">count</th></tr><tr id="row_10"><td class="val passed" id="row_10_0">10</td></tr></table></div></div><div class="scenario outline"><h3><span class="keyword">Scenario Outline:</span> <span class="val">another passing background</span></h3><ol><li class="step skipped" id="features_background_scenario_outline_passing_background_feature_13"><div><span class="keyword">Then</span> <span class="step val">I should have '&lt;count&gt;' cukes</span></div></li></ol><div class="examples"><h4><span class="keyword">Examples:</span> <span class="val"></span></h4><table><tr id="row_15"><th class="val skipped_param" id="row_15_0">count</th></tr><tr id="row_16"><td class="val passed" id="row_16_0">10</td></tr></table></div></div></div><div class="feature"><h2><span class="val">Feature: Calling undefined step</span></h2><p class="narrative"></p><div class="scenario"><h3><span class="keyword">Scenario:</span> <span class="val">Call directly</span></h3><ol><li class="step undefined" id="features_call_undefined_step_from_step_def_feature_4"><div><span class="keyword">Given</span> <span class="step val">a step definition that calls an undefined step</span></div><pre class="undefined">Undefined step: &amp;quot;this does not exist&amp;quot; (Cucumber::Undefined)
146
146
  ./features/step_definitions/sample_steps.rb:20:in `/^a step definition that calls an undefined step$/'
147
- features/call_undefined_step_from_step_def.feature:4:in `Given a step definition that calls an undefined step'</pre></li></ol></div><div class="scenario"><h3><span class="keyword">Scenario:</span> <span class="val">Call via another</span></h3><ol><li class="step undefined" id="features_call_undefined_step_from_step_def_feature_7"><div><span class="keyword">Given</span> <span class="step val">call step &quot;<span class="param">a step definition that calls an undefined step</span>&quot;</span></div><pre class="undefined">Undefined step: "this does not exist" (Cucumber::Undefined)
147
+ features/call_undefined_step_from_step_def.feature:4:in `Given a step definition that calls an undefined step'</pre></li></ol></div><div class="scenario"><h3><span class="keyword">Scenario:</span> <span class="val">Call via another</span></h3><ol><li class="step undefined" id="features_call_undefined_step_from_step_def_feature_7"><div><span class="keyword">Given</span> <span class="step val">call step &quot;<span class="param">a step definition that calls an undefined step</span>&quot;</span></div><pre class="undefined">Undefined step: &amp;quot;this does not exist&amp;quot; (Cucumber::Undefined)
148
148
  ./features/step_definitions/sample_steps.rb:20:in `/^a step definition that calls an undefined step$/'
149
- features/call_undefined_step_from_step_def.feature:7:in `Given call step "a step definition that calls an undefined step"'</pre></li></ol></div></div><div class="feature"><h2><span class="val">Feature: Failing expectation</span></h2><p class="narrative"></p><div class="scenario"><h3><span class="keyword">Scenario:</span> <span class="val">Failing expectation</span></h3><ol><li class="step failed" id="features_failing_expectation_feature_4"><div><span class="keyword">Given</span> <span class="step val">failing expectation</span></div><pre class="failed">expected: "that",
150
- got: "this" (using ==)
149
+ features/call_undefined_step_from_step_def.feature:7:in `Given call step &amp;quot;a step definition that calls an undefined step&amp;quot;'</pre></li></ol></div></div><div class="feature"><h2><span class="val">Feature: Failing expectation</span></h2><p class="narrative"></p><div class="scenario"><h3><span class="keyword">Scenario:</span> <span class="val">Failing expectation</span></h3><ol><li class="step failed" id="features_failing_expectation_feature_4"><div><span class="keyword">Given</span> <span class="step val">failing expectation</span></div><pre class="failed">expected: &amp;quot;that&amp;quot;,
150
+ got: &amp;quot;this&amp;quot; (using ==)
151
151
 
152
152
  Diff:
153
153
  @@ -1,2 +1,2 @@
@@ -166,7 +166,7 @@ which goes on and on and on for three lines
166
166
  yawn</span></h4><table><tr id="row_26"><th class="val skipped_param" id="row_26_0">state</th></tr><tr id="row_27"><td class="val passed" id="row_27_0">passing</td></tr></table></div></div></div><div class="feature"><h2><span class="val">Feature: Outline Sample</span></h2><p class="narrative"></p><div class="scenario"><h3><span class="keyword">Scenario:</span> <span class="val">I have no steps</span></h3><ol></ol></div><div class="scenario outline"><h3><span class="keyword">Scenario Outline:</span> <span class="val">Test state</span></h3><ol><li class="step skipped" id="features_outline_sample_feature_6"><div><span class="keyword">Given</span> <span class="step val">&lt;state&gt; without a table</span></div></li><li class="step skipped" id="features_outline_sample_feature_7"><div><span class="keyword">Given</span> <span class="step val">&lt;other_state&gt; without a table</span></div></li></ol><div class="examples"><h4><span class="keyword">Examples:</span> <span class="val">Rainbow colours</span></h4><table><tr id="row_9"><th class="val skipped_param" id="row_9_0">state</th><th class="val skipped_param" id="row_9_1">other_state</th></tr><tr id="row_10"><td class="val undefined" id="row_10_0">missing</td><td class="val skipped" id="row_10_1">passing</td></tr><tr id="row_11"><td class="val passed" id="row_11_0">passing</td><td class="val passed" id="row_11_1">passing</td></tr><tr id="row_12"><td class="val failed" id="row_12_0">failing</td><td class="val skipped" id="row_12_1">passing</td></tr><tr><td class="failed" colspan="2"><pre>FAIL (RuntimeError)
167
167
  ./features/step_definitions/sample_steps.rb:2:in `flunker'
168
168
  ./features/step_definitions/sample_steps.rb:16:in `/^failing without a table$/'
169
- features/outline_sample.feature:6:in `Given <state> without a table'</pre></td></tr></table></div><div class="examples"><h4><span class="keyword">Examples:</span> <span class="val">Only passing</span></h4><table><tr id="row_14"><th class="val skipped_param" id="row_14_0">state</th><th class="val skipped_param" id="row_14_1">other_state</th></tr><tr id="row_15"><td class="val passed" id="row_15_0">passing</td><td class="val passed" id="row_15_1">passing</td></tr></table></div></div></div><div class="feature"><pre class="comment"># Feature comment<br/></pre><span class="tag">@one</span><h2><span class="val">Feature: Sample</span></h2><p class="narrative"></p><div class="scenario"><span class="tag">@two</span> <span class="tag">@three</span><h3><span class="keyword">Scenario:</span> <span class="val">Missing</span></h3><ol><li class="step undefined" id="features_sample_feature_7"><div><span class="keyword">Given</span> <span class="step val">missing</span></div></li></ol></div><div class="scenario"><pre class="comment"># Scenario comment<br/></pre><span class="tag">@three</span><h3><span class="keyword">Scenario:</span> <span class="val">Passing</span></h3><ol><li class="step passed" id="features_sample_feature_12"><div><span class="keyword">Given</span> <span class="step val">passing</span></div><table><tr id="row_13"><td class="val" id="row_13_0">a</td><td class="val" id="row_13_1">b</td></tr><tr id="row_14"><td class="val" id="row_14_0">c</td><td class="val" id="row_14_1">d</td></tr></table></li></ol></div><div class="scenario"><span class="tag">@four</span><h3><span class="keyword">Scenario:</span> <span class="val">Failing</span></h3><ol><li class="step failed" id="features_sample_feature_18"><div><span class="keyword">Given</span> <span class="step val">failing</span></div><pre class="val">hello</pre><pre class="failed">FAIL (RuntimeError)
169
+ features/outline_sample.feature:6:in `Given &lt;state&gt; without a table'</pre></td></tr></table></div><div class="examples"><h4><span class="keyword">Examples:</span> <span class="val">Only passing</span></h4><table><tr id="row_14"><th class="val skipped_param" id="row_14_0">state</th><th class="val skipped_param" id="row_14_1">other_state</th></tr><tr id="row_15"><td class="val passed" id="row_15_0">passing</td><td class="val passed" id="row_15_1">passing</td></tr></table></div></div></div><div class="feature"><pre class="comment"># Feature comment<br/></pre><span class="tag">@one</span><h2><span class="val">Feature: Sample</span></h2><p class="narrative"></p><div class="scenario"><span class="tag">@two</span> <span class="tag">@three</span><h3><span class="keyword">Scenario:</span> <span class="val">Missing</span></h3><ol><li class="step undefined" id="features_sample_feature_7"><div><span class="keyword">Given</span> <span class="step val">missing</span></div></li></ol></div><div class="scenario"><pre class="comment"># Scenario comment<br/></pre><span class="tag">@three</span><h3><span class="keyword">Scenario:</span> <span class="val">Passing</span></h3><ol><li class="step passed" id="features_sample_feature_12"><div><span class="keyword">Given</span> <span class="step val">passing</span></div><table><tr id="row_13"><td class="val" id="row_13_0">a</td><td class="val" id="row_13_1">b</td></tr><tr id="row_14"><td class="val" id="row_14_0">c</td><td class="val" id="row_14_1">d</td></tr></table></li></ol></div><div class="scenario"><span class="tag">@four</span><h3><span class="keyword">Scenario:</span> <span class="val">Failing</span></h3><ol><li class="step failed" id="features_sample_feature_18"><div><span class="keyword">Given</span> <span class="step val">failing</span></div><pre class="val">hello</pre><pre class="failed">FAIL (RuntimeError)
170
170
  ./features/step_definitions/sample_steps.rb:2:in `flunker'
171
171
  ./features/step_definitions/sample_steps.rb:9:in `/^failing$/'
172
172
  features/sample.feature:18:in `Given failing'</pre></li></ol></div></div><div class="feature"><h2><span class="val">Feature: search examples</span></h2><p class="narrative"></p><div class="background"><h3><span class="keyword">Background:</span> <span class="val">Hantu Pisang background match</span></h3><ol><li class="step passed" id="features_search_sample_feature_4"><div><span class="keyword">Given</span> <span class="step val">passing without a table</span></div></li></ol></div><div class="scenario"><h3><span class="keyword">Scenario:</span> <span class="val">should match Hantu Pisang</span></h3><ol><li class="step passed" id="features_search_sample_feature_7"><div><span class="keyword">Given</span> <span class="step val">passing without a table</span></div></li></ol></div><div class="scenario"><h3><span class="keyword">Scenario:</span> <span class="val">Ignore me</span></h3><ol><li class="step failed" id="features_search_sample_feature_10"><div><span class="keyword">Given</span> <span class="step val">failing without a table</span></div><pre class="failed">FAIL (RuntimeError)
@@ -175,9 +175,9 @@ features/sample.feature:18:in `Given failing'</pre></li></ol></div></div><div cl
175
175
  features/search_sample.feature:10:in `Given failing without a table'</pre></li></ol></div><div class="scenario outline"><h3><span class="keyword">Scenario Outline:</span> <span class="val">Ignore me</span></h3><ol><li class="step skipped" id="features_search_sample_feature_13"><div><span class="keyword">Given</span> <span class="step val">&lt;state&gt; without a table</span></div></li></ol><div class="examples"><h4><span class="keyword">Examples:</span> <span class="val"></span></h4><table><tr id="row_15"><th class="val skipped_param" id="row_15_0">state</th></tr><tr id="row_16"><td class="val failed" id="row_16_0">failing</td></tr><tr><td class="failed" colspan="1"><pre>FAIL (RuntimeError)
176
176
  ./features/step_definitions/sample_steps.rb:2:in `flunker'
177
177
  ./features/step_definitions/sample_steps.rb:16:in `/^failing without a table$/'
178
- features/search_sample.feature:13:in `Given <state> without a table'</pre></td></tr></table></div></div><div class="scenario outline"><h3><span class="keyword">Scenario Outline:</span> <span class="val">Hantu Pisang match</span></h3><ol><li class="step skipped" id="features_search_sample_feature_19"><div><span class="keyword">Given</span> <span class="step val">&lt;state&gt; without a table</span></div></li></ol><div class="examples"><h4><span class="keyword">Examples:</span> <span class="val"></span></h4><table><tr id="row_21"><th class="val skipped_param" id="row_21_0">state</th></tr><tr id="row_22"><td class="val passed" id="row_22_0">passing</td></tr></table></div></div><div class="scenario outline"><h3><span class="keyword">Scenario Outline:</span> <span class="val">no match in name but in examples</span></h3><ol><li class="step skipped" id="features_search_sample_feature_25"><div><span class="keyword">Given</span> <span class="step val">&lt;state&gt; without a table</span></div></li></ol><div class="examples"><h4><span class="keyword">Examples:</span> <span class="val">Hantu Pisang</span></h4><table><tr id="row_27"><th class="val skipped_param" id="row_27_0">state</th></tr><tr id="row_28"><td class="val passed" id="row_28_0">passing</td></tr></table></div><div class="examples"><h4><span class="keyword">Examples:</span> <span class="val">Ignore me</span></h4><table><tr id="row_31"><th class="val skipped_param" id="row_31_0">state</th></tr><tr id="row_32"><td class="val failed" id="row_32_0">failing</td></tr><tr><td class="failed" colspan="1"><pre>FAIL (RuntimeError)
178
+ features/search_sample.feature:13:in `Given &lt;state&gt; without a table'</pre></td></tr></table></div></div><div class="scenario outline"><h3><span class="keyword">Scenario Outline:</span> <span class="val">Hantu Pisang match</span></h3><ol><li class="step skipped" id="features_search_sample_feature_19"><div><span class="keyword">Given</span> <span class="step val">&lt;state&gt; without a table</span></div></li></ol><div class="examples"><h4><span class="keyword">Examples:</span> <span class="val"></span></h4><table><tr id="row_21"><th class="val skipped_param" id="row_21_0">state</th></tr><tr id="row_22"><td class="val passed" id="row_22_0">passing</td></tr></table></div></div><div class="scenario outline"><h3><span class="keyword">Scenario Outline:</span> <span class="val">no match in name but in examples</span></h3><ol><li class="step skipped" id="features_search_sample_feature_25"><div><span class="keyword">Given</span> <span class="step val">&lt;state&gt; without a table</span></div></li></ol><div class="examples"><h4><span class="keyword">Examples:</span> <span class="val">Hantu Pisang</span></h4><table><tr id="row_27"><th class="val skipped_param" id="row_27_0">state</th></tr><tr id="row_28"><td class="val passed" id="row_28_0">passing</td></tr></table></div><div class="examples"><h4><span class="keyword">Examples:</span> <span class="val">Ignore me</span></h4><table><tr id="row_31"><th class="val skipped_param" id="row_31_0">state</th></tr><tr id="row_32"><td class="val failed" id="row_32_0">failing</td></tr><tr><td class="failed" colspan="1"><pre>FAIL (RuntimeError)
179
179
  ./features/step_definitions/sample_steps.rb:2:in `flunker'
180
180
  ./features/step_definitions/sample_steps.rb:16:in `/^failing without a table$/'
181
- features/search_sample.feature:25:in `Given <state> without a table'</pre></td></tr></table></div></div></div><div class="feature"><span class="tag">@sample_one</span><h2><span class="val">Feature: Tag samples</span></h2><p class="narrative"></p><div class="scenario"><span class="tag">@sample_two</span> <span class="tag">@sample_four</span><h3><span class="keyword">Scenario:</span> <span class="val">Passing</span></h3><ol><li class="step undefined" id="features_tags_sample_feature_6"><div><span class="keyword">Given</span> <span class="step val">missing</span></div></li></ol></div><div class="scenario outline"><span class="tag">@sample_three</span><h3><span class="keyword">Scenario Outline:</span> <span class="val"></span></h3><ol><li class="step skipped" id="features_tags_sample_feature_10"><div><span class="keyword">Given</span> <span class="step val">&lt;state&gt;</span></div></li></ol><div class="examples"><h4><span class="keyword">Examples:</span> <span class="val"></span></h4><table><tr id="row_12"><th class="val skipped_param" id="row_12_0">state</th></tr><tr id="row_13"><td class="val undefined" id="row_13_0">missing</td></tr></table></div></div><div class="scenario"><span class="tag">@sample_three</span> <span class="tag">@sample_four</span><h3><span class="keyword">Scenario:</span> <span class="val">Skipped</span></h3><ol><li class="step undefined" id="features_tags_sample_feature_17"><div><span class="keyword">Given</span> <span class="step val">missing</span></div></li></ol></div></div><div class="feature"><span class="tag">@lots</span><h2><span class="val">Feature: Tons of cukes</span></h2><p class="narrative"></p><div class="scenario"><h3><span class="keyword">Scenario:</span> <span class="val">Lots and lots</span></h3><ol><li class="step passed" id="features_tons_of_cukes_feature_4"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step failed" id="features_tons_of_cukes_feature_5"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div><pre class="failed">We already have 2 cukes! (RuntimeError)
181
+ features/search_sample.feature:25:in `Given &lt;state&gt; without a table'</pre></td></tr></table></div></div></div><div class="feature"><span class="tag">@sample_one</span><h2><span class="val">Feature: Tag samples</span></h2><p class="narrative"></p><div class="scenario"><span class="tag">@sample_two</span> <span class="tag">@sample_four</span><h3><span class="keyword">Scenario:</span> <span class="val">Passing</span></h3><ol><li class="step undefined" id="features_tags_sample_feature_6"><div><span class="keyword">Given</span> <span class="step val">missing</span></div></li></ol></div><div class="scenario outline"><span class="tag">@sample_three</span><h3><span class="keyword">Scenario Outline:</span> <span class="val"></span></h3><ol><li class="step skipped" id="features_tags_sample_feature_10"><div><span class="keyword">Given</span> <span class="step val">&lt;state&gt;</span></div></li></ol><div class="examples"><h4><span class="keyword">Examples:</span> <span class="val"></span></h4><table><tr id="row_12"><th class="val skipped_param" id="row_12_0">state</th></tr><tr id="row_13"><td class="val undefined" id="row_13_0">missing</td></tr></table></div></div><div class="scenario"><span class="tag">@sample_three</span> <span class="tag">@sample_four</span><h3><span class="keyword">Scenario:</span> <span class="val">Skipped</span></h3><ol><li class="step undefined" id="features_tags_sample_feature_17"><div><span class="keyword">Given</span> <span class="step val">missing</span></div></li></ol></div></div><div class="feature"><span class="tag">@lots</span><h2><span class="val">Feature: Tons of cukes</span></h2><p class="narrative"></p><div class="scenario"><h3><span class="keyword">Scenario:</span> <span class="val">Lots and lots</span></h3><ol><li class="step passed" id="features_tons_of_cukes_feature_4"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step failed" id="features_tons_of_cukes_feature_5"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div><pre class="failed">We already have 2 cukes! (RuntimeError)
182
182
  ./features/step_definitions/sample_steps.rb:28:in `/^'(.+)' cukes$/'
183
183
  features/tons_of_cukes.feature:5:in `Given '2' cukes'</pre></li><li class="step skipped" id="features_tons_of_cukes_feature_6"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_7"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_8"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_9"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_10"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_11"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_12"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_13"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_14"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_15"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_16"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_17"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_18"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_19"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_20"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_21"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_22"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_23"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_24"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_25"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_26"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_27"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_28"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_29"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_30"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_31"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_32"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_33"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_34"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_35"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_36"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_37"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_38"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_39"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_40"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_41"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_42"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_43"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_44"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_45"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_46"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_47"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_48"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_49"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_50"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_51"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li><li class="step skipped" id="features_tons_of_cukes_feature_52"><div><span class="keyword">Given</span> <span class="step val">'<span class="param">2</span>' cukes</span></div></li></ol></div></div><div class="feature"><h2><span class="val">Feature: undefined multiline args</span></h2><p class="narrative"></p><div class="scenario"><h3><span class="keyword">Scenario:</span> <span class="val">pystring</span></h3><ol><li class="step undefined" id="features_undefined_multiline_args_feature_4"><div><span class="keyword">Given</span> <span class="step val">a pystring</span></div><pre class="val"> example</pre></li></ol></div><div class="scenario"><h3><span class="keyword">Scenario:</span> <span class="val">table</span></h3><ol><li class="step undefined" id="features_undefined_multiline_args_feature_10"><div><span class="keyword">Given</span> <span class="step val">a table</span></div><table><tr id="row_11"><td class="val" id="row_11_0">table</td></tr><tr id="row_12"><td class="val" id="row_12_0">example</td></tr></table></li></ol></div></div><div class="duration">0m30.005s</div></div></body></html>
@@ -0,0 +1,61 @@
1
+ Feature: Tagged hooks
2
+
3
+ Background:
4
+ Given a standard Cucumber project directory structure
5
+ And a file named "features/step_definitions/steps.rb" with:
6
+ """
7
+ Given /^this step works$/ do
8
+ end
9
+ """
10
+ And a file named "features/support/hooks.rb" with:
11
+ """
12
+ Before('~@no-boom') do
13
+ raise 'boom'
14
+ end
15
+ """
16
+ And a file named "features/f.feature" with:
17
+ """
18
+ Feature: With and without hooks
19
+ Scenario: using hook
20
+ Given this step works
21
+
22
+ @no-boom
23
+ Scenario: omitting hook
24
+ Given this step works
25
+ """
26
+
27
+ Scenario: omit tagged hook
28
+ When I run cucumber features/f.feature:2
29
+ Then it should fail with
30
+ """
31
+ Feature: With and without hooks
32
+
33
+ Scenario: using hook # features/f.feature:2
34
+ boom (RuntimeError)
35
+ ./features/support/hooks.rb:2:in `Before'
36
+ Given this step works # features/step_definitions/steps.rb:1
37
+
38
+ Failing Scenarios:
39
+ cucumber features/f.feature:2 # Scenario: using hook
40
+
41
+ 1 scenario (1 failed)
42
+ 1 step (1 skipped)
43
+
44
+ """
45
+
46
+ Scenario: omit tagged hook
47
+ When I run cucumber features/f.feature:6
48
+ Then it should pass with
49
+ """
50
+ Feature: With and without hooks
51
+
52
+ @no-boom
53
+ Scenario: omitting hook # features/f.feature:6
54
+ Given this step works # features/step_definitions/steps.rb:1
55
+
56
+ 1 scenario (1 passed)
57
+ 1 step (1 passed)
58
+
59
+ """
60
+
61
+
@@ -48,7 +48,7 @@ Given /^I have environment variable (\w+) set to "([^\"]*)"$/ do |variable, valu
48
48
  end
49
49
 
50
50
  When /^I run cucumber (.*)$/ do |cucumber_opts|
51
- run "#{Cucumber::RUBY_BINARY} -I #{Spork::LIBDIR} #{Cucumber::BINARY} --no-color #{cucumber_opts}"
51
+ run "#{Cucumber::RUBY_BINARY} #{Cucumber::BINARY} --no-color #{cucumber_opts}"
52
52
  end
53
53
 
54
54
  When /^I run rake (.*)$/ do |rake_opts|
@@ -94,14 +94,14 @@ Then /^"([^\"]*)" with junit duration "([^\"]*)" should contain$/ do |actual_fil
94
94
  actual.should == text
95
95
  end
96
96
 
97
- Then /^"([^\"]*)" should match$/ do |file, text|
97
+ Then /^"([^\"]*)" should match "([^\"]*)"$/ do |file, text|
98
98
  IO.read(file).should =~ Regexp.new(text)
99
99
  end
100
100
 
101
101
  Then /^"([^\"]*)" should have the same contents as "([^\"]*)"$/ do |actual_file, expected_file|
102
102
  actual = IO.read(actual_file)
103
103
  actual = replace_duration(actual, '0m30.005s')
104
- # Comment out to replace expected file. Use with care! Remember to update duration afterwards.
104
+ # Comment out to replace expected file. Use with care!
105
105
  # File.open(expected_file, "w") {|io| io.write(actual)}
106
106
  actual.should == IO.read(expected_file)
107
107
  end
@@ -8,7 +8,8 @@ Feature: --formatter steps option - Steps Formatter
8
8
 
9
9
  Scenario: Printing steps
10
10
  When I run cucumber -f steps features
11
- Then it should pass with
11
+ Then STDERR should be empty
12
+ And it should pass with
12
13
  """
13
14
  features/step_definitions/steps_lib1.rb
14
15
  /^I defined a first step$/ # features/step_definitions/steps_lib1.rb:1
@@ -61,6 +61,7 @@ class CucumberWorld
61
61
  def create_file(file_name, file_content)
62
62
  file_content.gsub!("CUCUMBER_LIB", "'#{cucumber_lib_dir}'") # Some files, such as Rakefiles need to use the lib dir
63
63
  in_current_dir do
64
+ FileUtils.mkdir_p(File.dirname(file_name)) unless File.directory?(File.dirname(file_name))
64
65
  File.open(file_name, 'w') { |f| f << file_content }
65
66
  end
66
67
  end
@@ -83,7 +84,6 @@ class CucumberWorld
83
84
  stderr_file = Tempfile.new('cucumber')
84
85
  stderr_file.close
85
86
  in_current_dir do
86
- @last_stdout = `#{command} 2> #{stderr_file.path}`
87
87
  mode = Cucumber::RUBY_1_9 ? {:external_encoding=>"UTF-8"} : 'r'
88
88
  IO.popen("#{command} 2> #{stderr_file.path}", mode) do |io|
89
89
  @last_stdout = io.read