cucumber 0.6.3 → 0.6.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. data/History.txt +25 -4
  2. data/VERSION.yml +1 -1
  3. data/cucumber.gemspec +33 -29
  4. data/examples/i18n/{cat → ca}/Rakefile +0 -0
  5. data/examples/i18n/{cat → ca}/features/step_definitons/calculator_steps.rb +0 -0
  6. data/examples/i18n/{cat → ca}/features/suma.feature +1 -1
  7. data/examples/i18n/{cat → ca}/lib/calculadora.rb +0 -0
  8. data/examples/i18n/{se → sr-Cyrl}/Rakefile +0 -0
  9. data/examples/i18n/{sr → sr-Cyrl}/features/sabiranje.feature +1 -1
  10. data/examples/i18n/{sr → sr-Cyrl}/features/step_definitons/calculator_steps.rb +0 -0
  11. data/examples/i18n/{sr → sr-Cyrl}/features/support/env.rb +0 -0
  12. data/examples/i18n/{sr-latn → sr-Cyrl}/lib/calculator.rb +0 -0
  13. data/examples/i18n/{sr-latn → sr-Latn}/Rakefile +0 -0
  14. data/examples/i18n/{sr-latn → sr-Latn}/features/sabiranje.feature +0 -0
  15. data/examples/i18n/{sr-latn → sr-Latn}/features/step_definitons/calculator_steps.rb +0 -0
  16. data/examples/i18n/{sr → sr-Latn}/lib/calculator.rb +0 -0
  17. data/examples/i18n/{sr → sv}/Rakefile +0 -0
  18. data/examples/i18n/{se → sv}/features/step_definitons/kalkulator_steps.rb +0 -0
  19. data/examples/i18n/{se → sv}/features/summering.feature +1 -1
  20. data/examples/i18n/{se → sv}/lib/kalkulator.rb +0 -0
  21. data/features/announce.feature +27 -5
  22. data/features/bug_585_tab_indentation.feature +22 -0
  23. data/features/exception_in_after_block.feature +25 -0
  24. data/features/exception_in_before_block.feature +21 -0
  25. data/features/language_help.feature +6 -6
  26. data/features/snippets_when_using_star_keyword.feature +36 -0
  27. data/features/wire_protocol_tags.feature +50 -10
  28. data/gem_tasks/contributors.rake +4 -2
  29. data/lib/autotest/cucumber_rails_rspec2.rb +6 -0
  30. data/lib/autotest/cucumber_rspec2.rb +6 -0
  31. data/lib/cucumber/ast/outline_table.rb +8 -0
  32. data/lib/cucumber/ast/py_string.rb +5 -1
  33. data/lib/cucumber/ast/step_invocation.rb +2 -2
  34. data/lib/cucumber/cli/options.rb +1 -0
  35. data/lib/cucumber/cli/profile_loader.rb +8 -2
  36. data/lib/cucumber/formatter/pdf.rb +9 -2
  37. data/lib/cucumber/formatter/progress.rb +24 -2
  38. data/lib/cucumber/formatter/unicode.rb +11 -11
  39. data/lib/cucumber/languages.yml +14 -13
  40. data/lib/cucumber/parser/feature.rb +0 -257
  41. data/lib/cucumber/parser/feature.tt +0 -32
  42. data/lib/cucumber/parser/i18n.tt +2 -1
  43. data/lib/cucumber/parser/natural_language.rb +7 -4
  44. data/lib/cucumber/parser/py_string.rb +2 -2
  45. data/lib/cucumber/parser/py_string.tt +2 -2
  46. data/lib/cucumber/rb_support/rb_world.rb +9 -0
  47. data/lib/cucumber/step_mother.rb +3 -3
  48. data/spec/cucumber/ast/feature_factory.rb +1 -1
  49. data/spec/cucumber/ast/py_string_spec.rb +4 -4
  50. data/spec/cucumber/ast/step_spec.rb +1 -1
  51. data/spec/cucumber/cli/configuration_spec.rb +7 -0
  52. data/spec/cucumber/cli/profile_loader_spec.rb +29 -4
  53. data/spec/cucumber/step_mother_spec.rb +13 -3
  54. metadata +34 -30
@@ -1,3 +1,24 @@
1
+ == 0.6.4 2010-03-30
2
+
3
+ === Bugfixes
4
+ * Better handling of --guess with optional capture groups (Tim Felgentreff)
5
+ * Parsing of rerun.txt can't use Shellwords on Windows (#581 David Esposito)
6
+ * #announce can now take non-String arguments just like Kernel#puts - #to_s is done implicitly. (Aslak Hellesøy)
7
+ * Attempt to fix Cucumber::CODEPAGE error again for Windows (#561 Aslak Hellesøy)
8
+ * Tab indentation causes multiline step arguments to fail (#585 Aslak Hellesøy)
9
+ * Properly pass tags over the wire protocol (Matt Wynne)
10
+ * Profile loading should honour the --strict option (#580 Rob Holland)
11
+ * Snippets are properly printed when using '*' as step keyword. (Used to cause infinite recursion). (Aslak Hellesøy)
12
+
13
+ === New features
14
+ * Added #announce_world method, printing the World class and all included modules (Ruby only). (Aslak Hellesøy)
15
+ * Added #announce to the PDF formatter (Nicolas Bessi)
16
+ * Show fails for After/Before hooks in the progress formatter (#584 Joseph Wilk)
17
+
18
+ == Changed features
19
+ * Switced to ISO 639-1 (language) and ISO 3166 alpha-2 (region - if applicable). Applies to Catalan,
20
+ Swedish, Welsh, Romanian and Serbian. (Aslak Hellesøy)
21
+
1
22
  == 0.6.3 2010-03-02
2
23
 
3
24
  === Bugfixes
@@ -48,13 +69,13 @@ Bumping to 0.6.0 for this release since we're breaking backwards compatibility w
48
69
  This makes it more practical in most cases to mix tags from profiles and the command line
49
70
 
50
71
  In previous versions the following command line:
51
-
72
+
52
73
  --tags @foo,~@bar --tags @zap (on the command line)
53
-
74
+
54
75
  or the following Hook:
55
-
76
+
56
77
  Before("@foo,~@bar", "@zap") (for Hooks)
57
-
78
+
58
79
  would be equivalent to the boolean expression: (@foo && !@bar) || @zap
59
80
  Starting with this release it will be equivalent to: (@foo || !@bar) && @zap
60
81
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- :patch: 3
2
+ :patch: 4
3
3
  :build:
4
4
  :major: 0
5
5
  :minor: 6
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{cucumber}
8
- s.version = "0.6.3"
8
+ s.version = "0.6.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Aslak Helles\303\270y"]
12
- s.date = %q{2010-03-02}
12
+ s.date = %q{2010-03-30}
13
13
  s.default_executable = %q{cucumber}
14
14
  s.description = %q{A BDD tool written in Ruby}
15
15
  s.email = %q{cukes@googlegroups.com}
@@ -46,10 +46,10 @@ Gem::Specification.new do |s|
46
46
  "examples/i18n/bg/features/support/env.rb",
47
47
  "examples/i18n/bg/features/support/world.rb",
48
48
  "examples/i18n/bg/lib/calculator.rb",
49
- "examples/i18n/cat/Rakefile",
50
- "examples/i18n/cat/features/step_definitons/calculator_steps.rb",
51
- "examples/i18n/cat/features/suma.feature",
52
- "examples/i18n/cat/lib/calculadora.rb",
49
+ "examples/i18n/ca/Rakefile",
50
+ "examples/i18n/ca/features/step_definitons/calculator_steps.rb",
51
+ "examples/i18n/ca/features/suma.feature",
52
+ "examples/i18n/ca/lib/calculadora.rb",
53
53
  "examples/i18n/da/Rakefile",
54
54
  "examples/i18n/da/features/sammenlaegning.feature",
55
55
  "examples/i18n/da/features/step_definitons/lommeregner_steps.rb",
@@ -167,25 +167,25 @@ Gem::Specification.new do |s|
167
167
  "examples/i18n/ru/features/support/env.rb",
168
168
  "examples/i18n/ru/features/support/world.rb",
169
169
  "examples/i18n/ru/lib/calculator.rb",
170
- "examples/i18n/se/Rakefile",
171
- "examples/i18n/se/features/step_definitons/kalkulator_steps.rb",
172
- "examples/i18n/se/features/summering.feature",
173
- "examples/i18n/se/lib/kalkulator.rb",
174
170
  "examples/i18n/sk/.gitignore",
175
171
  "examples/i18n/sk/Rakefile",
176
172
  "examples/i18n/sk/features/addition.feature",
177
173
  "examples/i18n/sk/features/division.feature",
178
174
  "examples/i18n/sk/features/step_definitons/calculator_steps.rb",
179
175
  "examples/i18n/sk/lib/calculator.rb",
180
- "examples/i18n/sr-latn/Rakefile",
181
- "examples/i18n/sr-latn/features/sabiranje.feature",
182
- "examples/i18n/sr-latn/features/step_definitons/calculator_steps.rb",
183
- "examples/i18n/sr-latn/lib/calculator.rb",
184
- "examples/i18n/sr/Rakefile",
185
- "examples/i18n/sr/features/sabiranje.feature",
186
- "examples/i18n/sr/features/step_definitons/calculator_steps.rb",
187
- "examples/i18n/sr/features/support/env.rb",
188
- "examples/i18n/sr/lib/calculator.rb",
176
+ "examples/i18n/sr-Cyrl/Rakefile",
177
+ "examples/i18n/sr-Cyrl/features/sabiranje.feature",
178
+ "examples/i18n/sr-Cyrl/features/step_definitons/calculator_steps.rb",
179
+ "examples/i18n/sr-Cyrl/features/support/env.rb",
180
+ "examples/i18n/sr-Cyrl/lib/calculator.rb",
181
+ "examples/i18n/sr-Latn/Rakefile",
182
+ "examples/i18n/sr-Latn/features/sabiranje.feature",
183
+ "examples/i18n/sr-Latn/features/step_definitons/calculator_steps.rb",
184
+ "examples/i18n/sr-Latn/lib/calculator.rb",
185
+ "examples/i18n/sv/Rakefile",
186
+ "examples/i18n/sv/features/step_definitons/kalkulator_steps.rb",
187
+ "examples/i18n/sv/features/summering.feature",
188
+ "examples/i18n/sv/lib/kalkulator.rb",
189
189
  "examples/i18n/tr/.gitignore",
190
190
  "examples/i18n/tr/Rakefile",
191
191
  "examples/i18n/tr/features/bolme.feature",
@@ -332,6 +332,7 @@ Gem::Specification.new do |s|
332
332
  "features/bug_371.feature",
333
333
  "features/bug_464.feature",
334
334
  "features/bug_475.feature",
335
+ "features/bug_585_tab_indentation.feature",
335
336
  "features/call_many_steps.feature",
336
337
  "features/cucumber_cli.feature",
337
338
  "features/cucumber_cli_diff_disabled.feature",
@@ -359,6 +360,7 @@ Gem::Specification.new do |s|
359
360
  "features/rerun_formatter.feature",
360
361
  "features/simplest.feature",
361
362
  "features/snippet.feature",
363
+ "features/snippets_when_using_star_keyword.feature",
362
364
  "features/step_definitions/cucumber_steps.rb",
363
365
  "features/step_definitions/extra_steps.rb",
364
366
  "features/step_definitions/simplest_steps.rb",
@@ -390,7 +392,9 @@ Gem::Specification.new do |s|
390
392
  "lib/autotest/cucumber_mixin.rb",
391
393
  "lib/autotest/cucumber_rails.rb",
392
394
  "lib/autotest/cucumber_rails_rspec.rb",
395
+ "lib/autotest/cucumber_rails_rspec2.rb",
393
396
  "lib/autotest/cucumber_rspec.rb",
397
+ "lib/autotest/cucumber_rspec2.rb",
394
398
  "lib/autotest/discover.rb",
395
399
  "lib/cucumber.rb",
396
400
  "lib/cucumber/ast.rb",
@@ -550,7 +554,7 @@ Gem::Specification.new do |s|
550
554
 
551
555
  (::) U P G R A D I N G (::)
552
556
 
553
- Thank you for installing cucumber-0.6.3.
557
+ Thank you for installing cucumber-0.6.4.
554
558
  Please be sure to read http://wiki.github.com/aslakhellesoy/cucumber/upgrading
555
559
  for important information about this release. Happy cuking!
556
560
 
@@ -610,8 +614,8 @@ for important information about this release. Happy cuking!
610
614
  "examples/i18n/bg/features/support/env.rb",
611
615
  "examples/i18n/bg/features/support/world.rb",
612
616
  "examples/i18n/bg/lib/calculator.rb",
613
- "examples/i18n/cat/features/step_definitons/calculator_steps.rb",
614
- "examples/i18n/cat/lib/calculadora.rb",
617
+ "examples/i18n/ca/features/step_definitons/calculator_steps.rb",
618
+ "examples/i18n/ca/lib/calculadora.rb",
615
619
  "examples/i18n/da/features/step_definitons/lommeregner_steps.rb",
616
620
  "examples/i18n/da/lib/lommeregner.rb",
617
621
  "examples/i18n/de/features/step_definitons/calculator_steps.rb",
@@ -663,15 +667,15 @@ for important information about this release. Happy cuking!
663
667
  "examples/i18n/ru/features/support/env.rb",
664
668
  "examples/i18n/ru/features/support/world.rb",
665
669
  "examples/i18n/ru/lib/calculator.rb",
666
- "examples/i18n/se/features/step_definitons/kalkulator_steps.rb",
667
- "examples/i18n/se/lib/kalkulator.rb",
668
670
  "examples/i18n/sk/features/step_definitons/calculator_steps.rb",
669
671
  "examples/i18n/sk/lib/calculator.rb",
670
- "examples/i18n/sr/features/step_definitons/calculator_steps.rb",
671
- "examples/i18n/sr/features/support/env.rb",
672
- "examples/i18n/sr/lib/calculator.rb",
673
- "examples/i18n/sr-latn/features/step_definitons/calculator_steps.rb",
674
- "examples/i18n/sr-latn/lib/calculator.rb",
672
+ "examples/i18n/sr-Cyrl/features/step_definitons/calculator_steps.rb",
673
+ "examples/i18n/sr-Cyrl/features/support/env.rb",
674
+ "examples/i18n/sr-Cyrl/lib/calculator.rb",
675
+ "examples/i18n/sr-Latn/features/step_definitons/calculator_steps.rb",
676
+ "examples/i18n/sr-Latn/lib/calculator.rb",
677
+ "examples/i18n/sv/features/step_definitons/kalkulator_steps.rb",
678
+ "examples/i18n/sv/lib/kalkulator.rb",
675
679
  "examples/i18n/tr/features/step_definitons/hesap_makinesi_adimlari.rb",
676
680
  "examples/i18n/tr/lib/hesap_makinesi.rb",
677
681
  "examples/i18n/uz/features/step_definitons/calculator_steps.rb",
File without changes
@@ -1,4 +1,4 @@
1
- # language: cat
1
+ # language: ca
2
2
  Característica: Suma
3
3
  Per evitar fer errors tontos
4
4
  Com un matemàtic idiota
File without changes
@@ -1,4 +1,4 @@
1
- # language: sr
1
+ # language: sr-Cyrl
2
2
  Функционалност: Сабиранје
3
3
  Да бих избегао смешне грешке
4
4
  Као математичка незналица
File without changes
@@ -1,4 +1,4 @@
1
- # language: se
1
+ # language: sv
2
2
  Egenskap: Summering
3
3
  För att slippa att göra dumma fel
4
4
  Som räknare
@@ -1,6 +1,6 @@
1
1
  Feature: Delayed announcement
2
2
 
3
- Background:
3
+ Background:
4
4
  Given a standard Cucumber project directory structure
5
5
  And a file named "features/step_definitions/steps.rb" with:
6
6
  """
@@ -10,7 +10,7 @@ Feature: Delayed announcement
10
10
 
11
11
  Given /^I use multiple announces$/ do x=1
12
12
  announce("Multiple")
13
- announce("Announce")
13
+ announce(["Announce"])
14
14
  end
15
15
 
16
16
  Given /^I use announcement (.+) in line (.+) (?:with result (.+))$/ do |ann, line, result| x=1
@@ -26,6 +26,10 @@ Feature: Delayed announcement
26
26
 
27
27
  Given /^this step works$/ do x=1
28
28
  end
29
+
30
+ Given /^I announce the world$/ do x=1
31
+ announce_world
32
+ end
29
33
  """
30
34
  And a file named "features/f.feature" with:
31
35
  """
@@ -57,7 +61,14 @@ Feature: Delayed announcement
57
61
  | line | ann | result |
58
62
  | 1 | anno1 | fail |
59
63
  | 2 | anno2 | pass |
60
- """
64
+ """
65
+
66
+ And a file named "features/announce_world.feature" with:
67
+ """
68
+ Feature: announce_world
69
+ Scenario: announce_world
70
+ Given I announce the world
71
+ """
61
72
 
62
73
  Scenario: Delayed announcements feature
63
74
  When I run cucumber --format pretty features/f.feature
@@ -101,7 +112,7 @@ Feature: Delayed announcement
101
112
  ./features/step_definitions/steps.rb:13:in `/^I use announcement (.+) in line (.+) (?:with result (.+))$/'
102
113
  features/f.feature:23:in `Given I use announcement <ann> in line <line> with result <result>'
103
114
  | 2 | anno2 | pass | Line: 2: anno2
104
- """
115
+ """
105
116
 
106
117
  Scenario: Non-delayed announcements feature (progress formatter)
107
118
  When I run cucumber --format progress features/f.feature
@@ -119,4 +130,15 @@ Feature: Delayed announcement
119
130
  FFF
120
131
  Line: 2: anno2
121
132
  ...
122
- """
133
+ """
134
+
135
+ Scenario: announce world
136
+ When I run cucumber --format progress features/announce_world.feature
137
+ Then the output should contain
138
+ """
139
+ WORLD:
140
+ Object
141
+
142
+ Spec::Matchers
143
+ Cucumber::RbSupport::RbWorld
144
+ """
@@ -0,0 +1,22 @@
1
+ # Make sure tab indentation is preserved in this feature!
2
+ Feature: https://rspec.lighthouseapp.com/projects/16211/tickets/585
3
+ Scenario: Tab indentation should work
4
+ Given a standard Cucumber project directory structure
5
+ And a file named "features/f.feature" with:
6
+ """
7
+ Feature: developer creates a skeleton Ruby application
8
+ Scenario: create a new application
9
+ Given a tab indented pystring:
10
+ \"\"\"
11
+ I'm tab
12
+ and space indented
13
+ \"\"\"
14
+ And a file named "features/step_definitions/steps.rb" with:
15
+ \"\"\"
16
+ Given /a tab indented pystring:/ do |s| s.should == "I'm tab\n and space indented"
17
+ end
18
+ \"\"\"
19
+ """
20
+ When I run cucumber features/f.feature
21
+ Then STDERR should be empty
22
+ And it should pass
@@ -97,3 +97,28 @@ Feature: Exception in After Block
97
97
 
98
98
  """
99
99
 
100
+ Scenario: Handle Exception using the progress format
101
+ Given a file named "features/naughty_step_in_scenario.feature" with:
102
+ """
103
+ Feature: Sample
104
+
105
+ Scenario: Naughty Step
106
+ Given this step does something naughty
107
+
108
+ Scenario: Success
109
+ Given this step works
110
+ """
111
+ When I run cucumber features --format progress
112
+ Then it should fail with
113
+ """
114
+ .F.
115
+
116
+ Failing Scenarios:
117
+ cucumber features/naughty_step_in_scenario.feature:3 # Scenario: Naughty Step
118
+
119
+ 2 scenarios (1 failed, 1 passed)
120
+ 2 steps (2 passed)
121
+
122
+ """
123
+
124
+
@@ -75,3 +75,24 @@ Feature: Exception in Before Block
75
75
  2 steps (1 skipped, 1 passed)
76
76
 
77
77
  """
78
+
79
+ Scenario: Handle Exception using the progress format
80
+ Given a file named "features/naughty_step_in_scenario.feature" with:
81
+ """
82
+ Feature: Sample
83
+
84
+ Scenario: Run a good step
85
+ Given this step works
86
+ """
87
+ When I run cucumber features --format progress
88
+ Then it should fail with
89
+ """
90
+ F-
91
+
92
+ Failing Scenarios:
93
+ cucumber features/naughty_step_in_scenario.feature:3 # Scenario: Run a good step
94
+
95
+ 1 scenario (1 failed)
96
+ 1 step (1 skipped)
97
+
98
+ """
@@ -27,9 +27,9 @@ Feature: Language help
27
27
  """
28
28
  | ar | Arabic | العربية |
29
29
  | bg | Bulgarian | български |
30
- | cat | Catalan | català |
30
+ | ca | Catalan | català |
31
31
  | cs | Czech | Česky |
32
- | cy | Welsh | Cymraeg |
32
+ | cy-GB | Welsh | Cymraeg |
33
33
  | da | Danish | dansk |
34
34
  | de | German | Deutsch |
35
35
  | en | English | English |
@@ -54,12 +54,12 @@ Feature: Language help
54
54
  | pl | Polish | polski |
55
55
  | pt | Portuguese | português |
56
56
  | ro | Romanian | română |
57
- | ro2 | Romanian (diacritical) | română (diacritical) |
57
+ | ro-RO | Romanian (diacritical) | română (diacritical) |
58
58
  | ru | Russian | русский |
59
- | se | Swedish | Svenska |
60
59
  | sk | Slovak | Slovensky |
61
- | sr | Serbian | Српски |
62
- | sr-Latn | Serbian_latin | Srpski_latinica |
60
+ | sr-Cyrl | Serbian | Српски |
61
+ | sr-Latn | Serbian (Latin) | Srpski (Latinica) |
62
+ | sv | Swedish | Svenska |
63
63
  | tr | Turkish | Türkçe |
64
64
  | uz | Uzbek | Узбекча |
65
65
  | vi | Vietnamese | Tiếng Việt |
@@ -0,0 +1,36 @@
1
+ Feature: Use * keywords and still get snippets
2
+ In order to make it possible to use * instead of
3
+ Given/When/Then, I should not get an exception
4
+ when I have undefined steps
5
+
6
+ Scenario: Use some *
7
+ Given a standard Cucumber project directory structure
8
+ And a file named "features/f.feature" with:
9
+ """
10
+ Feature: F
11
+ Scenario: S
12
+ * I have some cukes
13
+ """
14
+ When I run cucumber features/f.feature
15
+ Then STDERR should be empty
16
+ And it should pass with
17
+ """
18
+ Feature: F
19
+
20
+ Scenario: S # features/f.feature:2
21
+ * I have some cukes # features/f.feature:3
22
+
23
+ 1 scenario (1 undefined)
24
+ 1 step (1 undefined)
25
+
26
+ You can implement step definitions for undefined steps with these snippets:
27
+
28
+ Given /^I have some cukes$/ do
29
+ pending # express the regexp above with the code you wish you had
30
+ end
31
+
32
+ If you want snippets in a different programming language, just make sure a file
33
+ with the appropriate file extension exists where cucumber looks for step definitions.
34
+
35
+
36
+ """