cucumber 0.3.93 → 0.3.94

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. data/History.txt +67 -38
  2. data/Manifest.txt +8 -0
  3. data/Rakefile +1 -1
  4. data/cucumber.yml +2 -2
  5. data/examples/python/features/fibonacci.feature +19 -0
  6. data/examples/python/features/step_definitions/fib_steps.rb +7 -0
  7. data/examples/python/features/support/env.rb +21 -0
  8. data/examples/python/lib/fib.py +7 -0
  9. data/examples/self_test/features/tags_sample.feature +17 -0
  10. data/examples/sinatra/README.textile +13 -0
  11. data/features/cucumber_cli.feature +85 -3
  12. data/features/custom_formatter.feature +2 -2
  13. data/features/html_formatter/a.html +1 -1
  14. data/features/junit_formatter.feature +19 -12
  15. data/features/step_definitions/cucumber_steps.rb +8 -15
  16. data/features/support/env.rb +4 -5
  17. data/gem_tasks/contributors.rake +4 -0
  18. data/lib/cucumber/ast/feature.rb +13 -0
  19. data/lib/cucumber/ast/feature_element.rb +8 -4
  20. data/lib/cucumber/ast/features.rb +6 -1
  21. data/lib/cucumber/ast/table.rb +13 -6
  22. data/lib/cucumber/ast/tags.rb +9 -1
  23. data/lib/cucumber/cli/configuration.rb +3 -15
  24. data/lib/cucumber/cli/main.rb +25 -8
  25. data/lib/cucumber/cli/options.rb +53 -31
  26. data/lib/cucumber/filter.rb +4 -3
  27. data/lib/cucumber/formatter/ansicolor.rb +42 -9
  28. data/lib/cucumber/formatter/console.rb +38 -6
  29. data/lib/cucumber/formatter/html.rb +2 -8
  30. data/lib/cucumber/formatter/junit.rb +65 -24
  31. data/lib/cucumber/formatter/ordered_xml_markup.rb +24 -0
  32. data/lib/cucumber/formatter/pretty.rb +9 -4
  33. data/lib/cucumber/formatter/progress.rb +7 -1
  34. data/lib/cucumber/rake/task.rb +3 -3
  35. data/lib/cucumber/step_mother.rb +3 -1
  36. data/lib/cucumber/version.rb +1 -1
  37. data/rails_generators/cucumber/templates/cucumber.rake +18 -6
  38. data/spec/cucumber/ast/scenario_outline_spec.rb +2 -2
  39. data/spec/cucumber/ast/table_spec.rb +5 -0
  40. data/spec/cucumber/cli/configuration_spec.rb +2 -1
  41. data/spec/cucumber/cli/options_spec.rb +11 -6
  42. metadata +10 -2
@@ -1,3 +1,32 @@
1
+ == 0.3.94 2009-08-06
2
+
3
+ Kanban take II.
4
+
5
+ Release 0.3.6 introduced a new --wip switch that can be used to limit work in progress
6
+ (WIP). Limiting WIP is central for Kanban Software Development (http://www.infoq.com/articles/hiranabe-lean-agile-kanban).
7
+
8
+ However, this feature went mostly unnoticed, and because we think it's so great we have decided
9
+ to make it the default for Rails projects. When you bootstrap your Rails project for Cucumber
10
+ you will now get 2 Cucumber Rake tasks for Kanban development:
11
+
12
+ cucumber:ok : Run features that should pass. This runs your "good,old" features
13
+ cucumber:wip : Run the features you're working on that don't pass yet. Tag them with @wip. Max 2!
14
+
15
+ So upgrade today and get into the habit of tagging new features with @wip (or invent your own tags).
16
+ You'll achieve better flow this way.
17
+
18
+ === New features
19
+ * Support limiting the number of feature elements with certain tags (#353 Joseph Wilk)
20
+ * script/generate cucumber sets up 'cucumber:ok' and 'cucumber:wip' tasks and deprecates 'features'. More Kanban love. (#344 Aslak Hellesøy)
21
+ * Better JUnit formatter: feature->testsuite, scenario->testcase. Better timing and support for background and scenario outline. (Mads Buus Westmark)
22
+ * Added examples/python that uses rubypython. (Aslak Hellesøy)
23
+ * Checks the number of available colors on the terminal with ruby-terminfo if ruby-terminfo is installed.
24
+ This prevents Apple's Terminal.app from stalling (Yugui - Yuki Sonoda).
25
+ * Set 'xterm-256color' to TERM if your terminal supports grey.
26
+ * ruby-terminfo is available as genki-ruby-terminfo gem from github.
27
+ * Document builtin formatters with --help. (#406 Aslak Hellesøy)
28
+ * Added support for using regular expressions when mapping table headers. (Peter Williams)
29
+
1
30
  == 0.3.93 2009-08-03
2
31
 
3
32
  Highlights in this release: Improved profile handling (cucumber.yml) and a fix for cucumber hanging.
@@ -39,9 +68,9 @@ links in one of the columns, you can do:
39
68
  === New Features
40
69
  * CTRL-C will exit immediately instead of carrying on until all features are run. (Aslak Hellesøy)
41
70
  * Run can be stopped programmatically by setting $cucumber_interrupted = true, for example in an After block. (Aslak Hellesøy)
71
+ * Support limiting the number of feature elements with certain tags (#353 Joseph Wilk)
42
72
  * Table support for cuke4duke
43
73
 
44
-
45
74
  == 0.3.90 2009-07-22
46
75
 
47
76
  The Hot summer release
@@ -53,7 +82,7 @@ a new release with lots of new features and bugfixes. This is also one of the la
53
82
  === Egality
54
83
 
55
84
  English is not the world's most spoken language, so why should Cucumber force non-English speakers to use the
56
- --language flag? As of this release you're no longer forced to do that. Instead, you can add a comment header
85
+ --language flag? As of this release you're no longer forced to do that. Instead, you can add a comment header
57
86
  to your .feature files:
58
87
 
59
88
  # language: fr
@@ -62,7 +91,7 @@ to your .feature files:
62
91
 
63
92
  If you don't have that header, Cucumber will work as before - using whatever you specified with --language,
64
93
  or default to English if no --language option was specified. A nice side effect of this is that you can now
65
- have features in several languages side by side and run them in the same cucumber. (Not recommended unless
94
+ have features in several languages side by side and run them in the same cucumber. (Not recommended unless
66
95
  you want to take polyglot programming to an extreme level).
67
96
 
68
97
  === Table diffing (experimental)
@@ -158,14 +187,14 @@ The Spork Release!
158
187
 
159
188
  This release has an exciting new feature - a new --drb switch! This magic switch lets you run your
160
189
  features much faster than before, because you can eliminate the startup time for your code. This is
161
- thanks to a brand new gem called Spork by Tim Harper and Ben Mabey. (You can find out more about Spork
162
- here: http://github.com/timcharper/spork/tree/master). You can start Spork and have it preload your
163
- application in a separate process. Spork listens for DRb connections, and when you run cucumber with
164
- --drb the features will run inside the Spork server instead. Spork provides two simple hooks for preloading
165
- your application - one for framework/stable code (Spork.prefork) and one for the code that *you* write and
190
+ thanks to a brand new gem called Spork by Tim Harper and Ben Mabey. (You can find out more about Spork
191
+ here: http://github.com/timcharper/spork/tree/master). You can start Spork and have it preload your
192
+ application in a separate process. Spork listens for DRb connections, and when you run cucumber with
193
+ --drb the features will run inside the Spork server instead. Spork provides two simple hooks for preloading
194
+ your application - one for framework/stable code (Spork.prefork) and one for the code that *you* write and
166
195
  change often (Spork.each_run). Keep in mind that all World, Before, and other Cucumber hooks need to be
167
- in the Spork.each_run block. Using Spork works great for Ruby on Rails, which can take a while to load,
168
- but --drb and Spork aren't tied to Rails at all. The new --drb switch also works great alongside autotest
196
+ in the Spork.each_run block. Using Spork works great for Ruby on Rails, which can take a while to load,
197
+ but --drb and Spork aren't tied to Rails at all. The new --drb switch also works great alongside autotest
169
198
  (just add --drb to your autotest profile in cucumber.yml), so now you can get even faster feedback.
170
199
 
171
200
  Cucumber's built-in cucumber generator now has a new --spork switch, so when you bootstrap your Rails
@@ -174,7 +203,7 @@ slightly different env.rb.)
174
203
 
175
204
  Although Spork was in mind when the --drb switch was added it is important to realize that all that was added
176
205
  to Cucumber was a DRb client. Any DRb server that adheres to this protocol can be used with Cucumber's --drb
177
- switch. While Spork is geared towards removing the load time to give you a faster feedback loop you could
206
+ switch. While Spork is geared towards removing the load time to give you a faster feedback loop you could
178
207
  just as easily use this client with a server that distributes your features to run in parallel. Someone just
179
208
  needs to write such a server. ;)
180
209
 
@@ -376,7 +405,7 @@ One of the most significant new features is Tagged Hooks: http://wiki.github.com
376
405
  This lets you associate Before and After blocks with specific scenarios.
377
406
 
378
407
  We are also deprecating the step_list, step_pattern, feature_list, and feature_pattern accessors on
379
- Cucumber::Rake::Task. These accessors will be completely removed in version 0.4. For complex settings
408
+ Cucumber::Rake::Task. These accessors will be completely removed in version 0.4. For complex settings
380
409
  please rely on cucumber profiles in your rake tasks:
381
410
  http://wiki.github.com/aslakhellesoy/cucumber/using-rake#profiles
382
411
 
@@ -423,7 +452,7 @@ in your steps. Windows/JRuby users can enjoy colours and you get some more sugar
423
452
  * Added new Cucumber::Ast::Table#rows_hash method (Torbjørn Vatn)
424
453
  * Windows/JRuby users can now enjoy colourful output (via http://github.com/aslakhellesoy/ansicolor) (#166 Aslak Hellesøy)
425
454
  * Ambiguous step errors hint about --guess (unless --guess already on) (Aslak Hellesøy)
426
- * Added translation for Slovak (Ahmed Al Hafoudh)
455
+ * Added translation for Slovak (Ahmed Al Hafoudh)
427
456
  * Updated translation for Dutch (Bart Zonneveld)
428
457
  * Updated translation for Italian (Alessandro Baroni)
429
458
  * Updated translation for Japanese (KAKUTANI Shintaro)
@@ -462,11 +491,11 @@ This release fixes a few minor bugs and adds a couple of new features.
462
491
 
463
492
  == 0.2.0 2009-03-18
464
493
 
465
- This release sports a bunch of new and exciting features, as well a major rewrite of Cucumber's internals.
466
- The rewrite was done to address technical debt and to have a code base that is easier to evolve and maintain.
494
+ This release sports a bunch of new and exciting features, as well a major rewrite of Cucumber's internals.
495
+ The rewrite was done to address technical debt and to have a code base that is easier to evolve and maintain.
467
496
 
468
- There are some changes to the Gherkin language that breaks backwards compatible with the 0.1.x series.
469
- Most importantly, "GivenScenario" and "More Examples" no longer exist. See the "Removed features" section
497
+ There are some changes to the Gherkin language that breaks backwards compatible with the 0.1.x series.
498
+ Most importantly, "GivenScenario" and "More Examples" no longer exist. See the "Removed features" section
470
499
  below for more details on how to use alternatives.
471
500
 
472
501
  Since the grammar has changed, there are some new keywords. We have to rely on the community
@@ -474,18 +503,18 @@ to provide updated translations. This is much easier than before - just update l
474
503
  There is no static code generation anymore. To list all languages:
475
504
 
476
505
  cucumber --lang help
477
-
506
+
478
507
  And to list the keywords for a particular language:
479
508
 
480
509
  cucumber --lang en-lol help
481
-
482
- There are some really awesome new features in this release: Tagging, Autoformatting, automatic
483
- aliasing of keywords in all languages, full Ruby 1.9 support and improved output
484
- for multiline arguments are some of the highlights.
510
+
511
+ There are some really awesome new features in this release: Tagging, Autoformatting, automatic
512
+ aliasing of keywords in all languages, full Ruby 1.9 support and improved output
513
+ for multiline arguments are some of the highlights.
485
514
 
486
515
  == Bugfixes
487
- * New StepInvocation breaks console formatter for pending steps. (#241 Jacob Radford)
488
- * Within Scenario Outlines when replacing with a nil in a step name use empty string instead. (#237 Joseph Wilk)
516
+ * New StepInvocation breaks console formatter for pending steps. (#241 Jacob Radford)
517
+ * Within Scenario Outlines when replacing with a nil in a step name use empty string instead. (#237 Joseph Wilk)
489
518
  * Fixed bug with Scenario Outlines incorrectly replacing values in step tables with nil. (#237 Joseph Wilk)
490
519
  * Within Scenario Outlines when replacing with a nil in multiline strings use empty string instead. (#238 Joseph Wilk)
491
520
  * Re-structure the ast: Feature -> Background -> (Scenario|ScenarioOutline)*. Fixes bug with background being called outside transactions. (#181 Joseph Wilk)
@@ -517,7 +546,7 @@ for multiline arguments are some of the highlights.
517
546
  * Rails generators supports testunit and rspec option, defaulting to rspec (#217 Josh Nichols)
518
547
  * Sinatra Example (#204 Rob Holland)
519
548
  * Keywords can be aliased in languages.yml. See English for an example (examples: Examples|Scenarios)
520
- * Adding support for Background (#153 Joseph Wilk)
549
+ * Adding support for Background (#153 Joseph Wilk)
521
550
  * Added Česky/Czech (Vojtech Salbaba)
522
551
  * New --no-multiline option to reduce noise in output. Useful if lots of features are failing. (Aslak Hellesøy)
523
552
  * Added ability to pass URIs to cucumber in addition to files and directories. Useful for troubleshooting! (Aslak Hellesøy)
@@ -596,8 +625,8 @@ Bugfix release
596
625
 
597
626
  == 0.1.14 2009-01-04
598
627
 
599
- This is the first release of Cucumber that runs on Ruby 1.9. There are still some encoding-related issues
600
- with Arabic (ar), Japanese (ja) and Simplified Chinese (zh-CN). Patches are welcome. Other than that -
628
+ This is the first release of Cucumber that runs on Ruby 1.9. There are still some encoding-related issues
629
+ with Arabic (ar), Japanese (ja) and Simplified Chinese (zh-CN). Patches are welcome. Other than that -
601
630
  a couple of minor bug fixes and polishing.
602
631
 
603
632
  === New features
@@ -614,9 +643,9 @@ a couple of minor bug fixes and polishing.
614
643
  == 0.1.13 2008-12-20
615
644
 
616
645
  It's time for some new features again. Output is now much better since you can use diffing, tweak
617
- the output colours and get the full --backtrace if you want. Managing your support/* files became
618
- a little easier since they are now always loaded before the step definitions. Life became easier
619
- for Windows users in Norway (and other countries using unicode in the features). Plus several other
646
+ the output colours and get the full --backtrace if you want. Managing your support/* files became
647
+ a little easier since they are now always loaded before the step definitions. Life became easier
648
+ for Windows users in Norway (and other countries using unicode in the features). Plus several other
620
649
  bug fixes.
621
650
 
622
651
  Enjoy!
@@ -640,7 +669,7 @@ Enjoy!
640
669
  * Fixed a bug where row step outlines were loosing step tables. (#121 Joseph Wilk, Ben Mabey)
641
670
  * The Cucumber Autotest plugin now launches JRuby if autotest is run with JRuby (Aslak Hellesøy)
642
671
  * Provide helpful and non-confusing error message when specified profile is blank. (#118, Ben Mabey)
643
- * Improve handling and error messages for malformed cucumber.yml files. (#117, Ben Mabey)
672
+ * Improve handling and error messages for malformed cucumber.yml files. (#117, Ben Mabey)
644
673
  * document :x run option in command line help (#114, Aslak Hellesøy)
645
674
  * Change 'visits' to 'visit' in features generator to comply with new Webrat API (Darius Roberts)
646
675
 
@@ -648,7 +677,7 @@ Enjoy!
648
677
 
649
678
  == 0.1.12 2008-12-04
650
679
 
651
- This is the "getting serious with IronRuby release" - largely based on
680
+ This is the "getting serious with IronRuby release" - largely based on
652
681
  "Patrick Gannon":http://www.patrickgannon.net/archive/2008/10/23/bdd-style-feature-tests-using-ironruby-and-rspeccucumber.aspx's
653
682
  blog entry.
654
683
 
@@ -694,7 +723,7 @@ This will run foo.feature at line 15 and bar.feature at line 6, 45 and 111.
694
723
  * AUTOFEATURE=tRue works (case insensitive) (Aslak Hellesøy)
695
724
  * Initial support for .NET via IronRuby. (Aslak Hellesøy)
696
725
  * Lithuanian translation (sauliusgrigaitis)
697
- * New webrat step defintions to wrap the new selects_time, selects_date, and selects_datetime methods. (Ben Mabey)
726
+ * New webrat step defintions to wrap the new selects_time, selects_date, and selects_datetime methods. (Ben Mabey)
698
727
  * Try to load webrat gem if it's not installed as a plugin (Aslak Hellesøy)
699
728
  * Support example.feature:20 or example.feature:10:20:30 syntax for running features at specific line number(s). (#88 Joseph Wilk)
700
729
 
@@ -746,7 +775,7 @@ support and how multiline strings work in feature files:
746
775
  that "indents"
747
776
  and spans
748
777
  several lines
749
-
778
+
750
779
  """
751
780
 
752
781
  # In your steps.rb file
@@ -802,7 +831,7 @@ Tables used to define more examples after a scenario must now be prefixed. In En
802
831
 
803
832
  Feature: Addition
804
833
  In order to avoid silly mistakes
805
- As a math idiot
834
+ As a math idiot
806
835
  I want to be told the sum of two numbers
807
836
 
808
837
  Scenario: Add two numbers
@@ -819,7 +848,7 @@ Tables used to define more examples after a scenario must now be prefixed. In En
819
848
 
820
849
  Languages that are not updated yet will have to use "More Examples" until we get the translations.
821
850
 
822
- Tables can also be used as arguments to individual steps. In fact, steps now support a single argument
851
+ Tables can also be used as arguments to individual steps. In fact, steps now support a single argument
823
852
  that can span several lines. This can be a table or a string.
824
853
 
825
854
  Example:
@@ -886,7 +915,7 @@ example:
886
915
  Given "I am registered as #{role}, #{name}, secret"
887
916
  When "I log in with #{name}, secret"
888
917
  end
889
-
918
+
890
919
  Given /I am registered as (.*), (.*), (.*)/ do |role, name, password|
891
920
  # (Code removed for brevity)
892
921
  end
@@ -899,7 +928,7 @@ This means that steps can be reused in other steps. The GivenScenario feature ac
899
928
  effect (on the scenario level), but this feature is something we're not very happy with, mostly
900
929
  because it's not parameterisable. Calling steps from steps is.
901
930
 
902
- GivenScenario will still be working several releases, but the plan is to remove it completely in
931
+ GivenScenario will still be working several releases, but the plan is to remove it completely in
903
932
  the 0.3.0 release.
904
933
 
905
934
  === Seeing where a step is defined
@@ -167,6 +167,10 @@ examples/junit/features/one_passing_one_failing.feature
167
167
  examples/junit/features/pending.feature
168
168
  examples/junit/features/step_definitions/steps.rb
169
169
  examples/pure_java/README.textile
170
+ examples/python/features/fibonacci.feature
171
+ examples/python/features/step_definitions/fib_steps.rb
172
+ examples/python/features/support/env.rb
173
+ examples/python/lib/fib.py
170
174
  examples/selenium/Rakefile
171
175
  examples/selenium/features/search.feature
172
176
  examples/selenium/features/step_definitons/search_steps.rb
@@ -196,8 +200,10 @@ examples/self_test/features/sample.feature
196
200
  examples/self_test/features/search_sample.feature
197
201
  examples/self_test/features/step_definitions/sample_steps.rb
198
202
  examples/self_test/features/support/env.rb
203
+ examples/self_test/features/tags_sample.feature
199
204
  examples/self_test/features/tons_of_cukes.feature
200
205
  examples/self_test/features/undefined_multiline_args.feature
206
+ examples/sinatra/README.textile
201
207
  examples/sinatra/Rakefile
202
208
  examples/sinatra/app.rb
203
209
  examples/sinatra/features/add.feature
@@ -274,6 +280,7 @@ features/table_diffing.feature
274
280
  features/unicode_table.feature
275
281
  features/usage.feature
276
282
  features/work_in_progress.feature
283
+ gem_tasks/contributors.rake
277
284
  gem_tasks/deployment.rake
278
285
  gem_tasks/environment.rake
279
286
  gem_tasks/features.rake
@@ -328,6 +335,7 @@ lib/cucumber/formatter/cucumber.sass
328
335
  lib/cucumber/formatter/duration.rb
329
336
  lib/cucumber/formatter/html.rb
330
337
  lib/cucumber/formatter/junit.rb
338
+ lib/cucumber/formatter/ordered_xml_markup.rb
331
339
  lib/cucumber/formatter/pretty.rb
332
340
  lib/cucumber/formatter/profile.rb
333
341
  lib/cucumber/formatter/progress.rb
data/Rakefile CHANGED
@@ -6,4 +6,4 @@ Dir['gem_tasks/**/*.rake'].each { |rake| load rake }
6
6
 
7
7
  # Hoe gives us :default => :test, but we don't have Test::Unit tests.
8
8
  Rake::Task[:default].clear_prerequisites rescue nil # For some super weird reason this fails for some...
9
- task :default => [:spec, :features]
9
+ task :default => [:spec, :cucumber]
@@ -1,2 +1,2 @@
1
- default: --format progress --tags ~@proposed,~@in-progress features
2
- wip: --tags @in-progress --wip features
1
+ default: --format progress --tags ~@proposed,~@wip --strict features
2
+ wip: --tags @wip --wip features
@@ -0,0 +1,19 @@
1
+ Feature: Fibonacci
2
+ In order to calculate super fast fibonacci series
3
+ As a pythonista
4
+ I want to use Python for that
5
+
6
+ Scenario Outline: Series
7
+ When I ask python to calculate fibonacci up to <n>
8
+ Then it should give me <series>
9
+
10
+ Examples:
11
+ | n | series |
12
+ | 1 | [] |
13
+ | 2 | [1, 1] |
14
+ | 3 | [1, 1, 2] |
15
+ | 4 | [1, 1, 2, 3] |
16
+ | 6 | [1, 1, 2, 3, 5] |
17
+ | 9 | [1, 1, 2, 3, 5, 8] |
18
+ | 100 | [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] |
19
+
@@ -0,0 +1,7 @@
1
+ When /^I ask python to calculate fibonacci up to (\d+)$/ do |n|
2
+ @fib_result = @fib.fib(n.to_i)
3
+ end
4
+
5
+ Then /^it should give me (\[.*\])$/ do |expected|
6
+ @fib_result.inspect.should == expected
7
+ end
@@ -0,0 +1,21 @@
1
+ require 'rubypython'
2
+
3
+ ENV['PYTHONPATH'] = File.expand_path(File.dirname(__FILE__) + '/../../lib')
4
+
5
+ Before do
6
+ RubyPython.start
7
+ @fib = RubyPython.import('fib')
8
+ end
9
+
10
+ After do
11
+ RubyPython.stop
12
+ end
13
+
14
+ # RubyPython seems to expect this to exist (?)
15
+ class String
16
+ def end_with?(str)
17
+ str = str.to_str
18
+ tail = self[-str.length, str.length]
19
+ tail == str
20
+ end
21
+ end
@@ -0,0 +1,7 @@
1
+ def fib(n):
2
+ result = []
3
+ a, b = 0, 1
4
+ while b < n:
5
+ result.append(b)
6
+ a, b = b, a+b
7
+ return result
@@ -0,0 +1,17 @@
1
+ @sample_one
2
+ Feature: Tag samples
3
+
4
+ @sample_two @sample_four
5
+ Scenario: Passing
6
+ Given missing
7
+
8
+ @sample_three
9
+ Scenario Outline:
10
+ Given <state>
11
+ Examples:
12
+ |state|
13
+ |missing|
14
+
15
+ @sample_three @sample_four
16
+ Scenario: Skipped
17
+ Given missing
@@ -0,0 +1,13 @@
1
+ h1. Sinatra and Cucumber
2
+
3
+ This example will work with:
4
+
5
+ * sinatra 0.9.4
6
+ * rack-test 0.3.0
7
+
8
+ As of this writing, the latest released webrat gem isn't compatible with these gems, so you need this:
9
+
10
+ * aslakhellesoy-webrat 0.4.4.1
11
+
12
+ That webrat gem is built from sr's ps2 branch: http://github.com/brynary/webrat/network
13
+
@@ -311,6 +311,25 @@ Feature: Cucumber command line
311
311
  | state |
312
312
  | failing |
313
313
 
314
+ @sample_one
315
+ Feature: Tag samples
316
+
317
+ @sample_two @sample_four
318
+ Scenario: Passing
319
+ Given missing
320
+
321
+ @sample_three
322
+ Scenario Outline:
323
+ Given <state>
324
+
325
+ Examples:
326
+ | state |
327
+ | missing |
328
+
329
+ @sample_three @sample_four
330
+ Scenario: Skipped
331
+ Given missing
332
+
314
333
  Feature: undefined multiline args
315
334
 
316
335
  Scenario: pystring
@@ -323,9 +342,9 @@ Feature: Cucumber command line
323
342
  Given a table
324
343
  | table |
325
344
  | example |
326
-
327
- 23 scenarios (17 skipped, 5 undefined, 1 passed)
328
- 39 steps (30 skipped, 9 undefined)
345
+
346
+ 26 scenarios (17 skipped, 8 undefined, 1 passed)
347
+ 42 steps (30 skipped, 12 undefined)
329
348
 
330
349
  """
331
350
 
@@ -488,6 +507,69 @@ Feature: Cucumber command line
488
507
 
489
508
  """
490
509
 
510
+ Scenario: Run with limited tag number
511
+ When I run cucumber -q features/tags_sample.feature --dry-run -t sample_three:1
512
+ Then it should fail with
513
+ """
514
+ @sample_one
515
+ Feature: Tag samples
516
+
517
+ @sample_three
518
+ Scenario Outline:
519
+ Given <state>
520
+
521
+ Examples:
522
+ | state |
523
+ | missing |
524
+
525
+ @sample_three @sample_four
526
+ Scenario: Skipped
527
+ Given missing
528
+
529
+ 2 scenarios (2 undefined)
530
+ 2 steps (2 undefined)
531
+
532
+ Failed due to exceeding the tag limit
533
+ @sample_three occurred:2 limit:1
534
+ features/tags_sample.feature:9
535
+ features/tags_sample.feature:16
536
+
537
+ """
538
+
539
+ Scenario: Run with a feature tag which has a limit
540
+ When I run cucumber -q features/tags_sample.feature --dry-run -t sample_one:1
541
+ Then it should fail with
542
+ """
543
+ @sample_one
544
+ Feature: Tag samples
545
+
546
+ @sample_two @sample_four
547
+ Scenario: Passing
548
+ Given missing
549
+
550
+ @sample_three
551
+ Scenario Outline:
552
+ Given <state>
553
+
554
+ Examples:
555
+ | state |
556
+ | missing |
557
+
558
+ @sample_three @sample_four
559
+ Scenario: Skipped
560
+ Given missing
561
+
562
+ 3 scenarios (3 undefined)
563
+ 3 steps (3 undefined)
564
+
565
+ Failed due to exceeding the tag limit
566
+ @sample_one occurred:3 limit:1
567
+ features/tags_sample.feature:5
568
+ features/tags_sample.feature:9
569
+ features/tags_sample.feature:16
570
+
571
+ """
572
+
491
573
  Scenario: Reformat files with --autoformat
492
574
  When I run cucumber --autoformat tmp/formatted features
493
575
  Then "examples/self_test/tmp/formatted/features/sample.feature" should contain