cucumber 0.4.3 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +27 -0
- data/VERSION.yml +3 -2
- data/cucumber.gemspec +11 -5
- data/examples/watir/features/support/screenshots.rb +1 -2
- data/features/call_many_steps.feature +124 -0
- data/features/default_snippets.feature +2 -2
- data/features/expand.feature +13 -2
- data/features/language_help.feature +1 -1
- data/features/report_called_undefined_steps.feature +1 -1
- data/features/snippet.feature +2 -2
- data/features/support/env.rb +3 -5
- data/features/tag_logic.feature +32 -0
- data/features/wire_protocol.feature +7 -7
- data/lib/cucumber.rb +6 -0
- data/lib/cucumber/ast/background.rb +1 -1
- data/lib/cucumber/ast/comment.rb +1 -1
- data/lib/cucumber/ast/examples.rb +1 -1
- data/lib/cucumber/ast/feature.rb +1 -1
- data/lib/cucumber/ast/feature_element.rb +2 -3
- data/lib/cucumber/ast/features.rb +1 -1
- data/lib/cucumber/ast/outline_table.rb +17 -4
- data/lib/cucumber/ast/py_string.rb +3 -1
- data/lib/cucumber/ast/scenario.rb +3 -1
- data/lib/cucumber/ast/scenario_outline.rb +2 -2
- data/lib/cucumber/ast/step.rb +1 -1
- data/lib/cucumber/ast/step_collection.rb +1 -1
- data/lib/cucumber/ast/step_invocation.rb +2 -1
- data/lib/cucumber/ast/table.rb +3 -3
- data/lib/cucumber/ast/tags.rb +18 -11
- data/lib/cucumber/ast/tree_walker.rb +16 -0
- data/lib/cucumber/cli/main.rb +3 -2
- data/lib/cucumber/cli/options.rb +4 -6
- data/lib/cucumber/cli/profile_loader.rb +4 -0
- data/lib/cucumber/filter.rb +2 -2
- data/lib/cucumber/formatter/ansicolor.rb +8 -0
- data/lib/cucumber/formatter/pretty.rb +3 -4
- data/lib/cucumber/language_support/language_methods.rb +4 -3
- data/lib/cucumber/languages.yml +1 -1
- data/lib/cucumber/parser.rb +2 -0
- data/lib/cucumber/parser/common.rb +170 -0
- data/lib/cucumber/parser/common.tt +21 -0
- data/lib/cucumber/parser/feature.rb +7 -291
- data/lib/cucumber/parser/feature.tt +7 -43
- data/lib/cucumber/parser/i18n.tt +2 -0
- data/lib/cucumber/parser/natural_language.rb +9 -0
- data/lib/cucumber/parser/py_string.rb +276 -0
- data/lib/cucumber/parser/py_string.tt +45 -0
- data/lib/cucumber/parser/table.rb +5 -120
- data/lib/cucumber/parser/table.tt +2 -13
- data/lib/cucumber/platform.rb +3 -2
- data/lib/cucumber/rails/active_record.rb +2 -21
- data/lib/cucumber/rails/world.rb +2 -1
- data/lib/cucumber/rb_support/rb_hook.rb +2 -1
- data/lib/cucumber/rb_support/rb_language.rb +8 -6
- data/lib/cucumber/rb_support/rb_step_definition.rb +4 -0
- data/lib/cucumber/rb_support/rb_world.rb +16 -37
- data/lib/cucumber/step_mother.rb +86 -2
- data/lib/cucumber/wire_support/wire_language.rb +2 -2
- data/lib/cucumber/wire_support/wire_protocol.rb +1 -1
- data/rails_generators/cucumber/cucumber_generator.rb +3 -1
- data/rails_generators/cucumber/templates/cucumber.rake +4 -2
- data/rails_generators/cucumber/templates/webrat_steps.rb +28 -28
- data/spec/cucumber/ast/background_spec.rb +2 -1
- data/spec/cucumber/ast/scenario_spec.rb +3 -1
- data/spec/cucumber/formatter/console_spec.rb +1 -1
- data/spec/cucumber/rb_support/rb_step_definition_spec.rb +14 -5
- data/spec/cucumber/step_mother_spec.rb +1 -1
- data/spec/cucumber/world/pending_spec.rb +1 -1
- metadata +8 -3
@@ -13,7 +13,7 @@ module Cucumber
|
|
13
13
|
it "should not raise an error when there are no tags" do
|
14
14
|
@tag_occurrences = nil
|
15
15
|
|
16
|
-
lambda{print_tag_limit_warnings(:tag_names => {'@wip'
|
16
|
+
lambda{print_tag_limit_warnings(:tag_names => {'@wip' => 2})}.should_not raise_error
|
17
17
|
end
|
18
18
|
end
|
19
19
|
end
|
@@ -13,7 +13,7 @@ module Cucumber
|
|
13
13
|
@rb = @step_mother.load_programming_language('rb')
|
14
14
|
@dsl = Object.new
|
15
15
|
@dsl.extend RbSupport::RbDsl
|
16
|
-
@step_mother.before(
|
16
|
+
@step_mother.before(mock('scenario', :null_object => true))
|
17
17
|
|
18
18
|
$inside = nil
|
19
19
|
end
|
@@ -62,6 +62,15 @@ module Cucumber
|
|
62
62
|
end.should raise_error(Pending, "Do me!")
|
63
63
|
end
|
64
64
|
|
65
|
+
it "should raise ArityMismatchError when the number of capture groups differs from the number of step arguments" do
|
66
|
+
@dsl.Given /No group: \w+/ do |arg|
|
67
|
+
end
|
68
|
+
|
69
|
+
lambda do
|
70
|
+
@step_mother.step_match("No group: arg").invoke(nil)
|
71
|
+
end.should raise_error(ArityMismatchError)
|
72
|
+
end
|
73
|
+
|
65
74
|
it "should allow announce" do
|
66
75
|
v = mock('visitor')
|
67
76
|
v.should_receive(:announce).with('wasup')
|
@@ -89,7 +98,7 @@ module Cucumber
|
|
89
98
|
it "should recognise quotes in name and make according regexp" do
|
90
99
|
@rb.snippet_text('Given', 'A "first" arg', nil).should == unindented(%{
|
91
100
|
Given /^A "([^\\"]*)" arg$/ do |arg1|
|
92
|
-
pending
|
101
|
+
pending # express the regexp above with the code you wish you had
|
93
102
|
end
|
94
103
|
})
|
95
104
|
end
|
@@ -97,7 +106,7 @@ module Cucumber
|
|
97
106
|
it "should recognise several quoted words in name and make according regexp and args" do
|
98
107
|
@rb.snippet_text('Given', 'A "first" and "second" arg', nil).should == unindented(%{
|
99
108
|
Given /^A "([^\\"]*)" and "([^\\"]*)" arg$/ do |arg1, arg2|
|
100
|
-
pending
|
109
|
+
pending # express the regexp above with the code you wish you had
|
101
110
|
end
|
102
111
|
})
|
103
112
|
end
|
@@ -105,7 +114,7 @@ module Cucumber
|
|
105
114
|
it "should not use quote group when there are no quotes" do
|
106
115
|
@rb.snippet_text('Given', 'A first arg', nil).should == unindented(%{
|
107
116
|
Given /^A first arg$/ do
|
108
|
-
pending
|
117
|
+
pending # express the regexp above with the code you wish you had
|
109
118
|
end
|
110
119
|
})
|
111
120
|
end
|
@@ -114,7 +123,7 @@ module Cucumber
|
|
114
123
|
@rb.snippet_text('Given', 'A "first" arg', Cucumber::Ast::Table).should == unindented(%{
|
115
124
|
Given /^A "([^\\"]*)" arg$/ do |arg1, table|
|
116
125
|
# table is a Cucumber::Ast::Table
|
117
|
-
pending
|
126
|
+
pending # express the regexp above with the code you wish you had
|
118
127
|
end
|
119
128
|
})
|
120
129
|
end
|
@@ -128,7 +128,7 @@ spec/cucumber/step_mother_spec.rb:48:in `/Three cute (.*)/'
|
|
128
128
|
|
129
129
|
it "should implicitly extend world with modules" do
|
130
130
|
@dsl.World(ModuleOne, ModuleTwo)
|
131
|
-
@step_mother.before(
|
131
|
+
@step_mother.before(mock('scenario', :null_object => true))
|
132
132
|
class << @rb.current_world
|
133
133
|
included_modules.index(ModuleOne).should_not == nil
|
134
134
|
included_modules.index(ModuleTwo).should_not == nil
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cucumber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "Aslak Helles\xC3\xB8y"
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-11-13 00:00:00 +01:00
|
13
13
|
default_executable: cucumber
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -412,6 +412,7 @@ files:
|
|
412
412
|
- features/bug_371.feature
|
413
413
|
- features/bug_464.feature
|
414
414
|
- features/bug_475.feature
|
415
|
+
- features/call_many_steps.feature
|
415
416
|
- features/cucumber_cli.feature
|
416
417
|
- features/cucumber_cli_diff_disabled.feature
|
417
418
|
- features/cucumber_cli_outlines.feature
|
@@ -523,10 +524,14 @@ files:
|
|
523
524
|
- lib/cucumber/language_support/language_methods.rb
|
524
525
|
- lib/cucumber/languages.yml
|
525
526
|
- lib/cucumber/parser.rb
|
527
|
+
- lib/cucumber/parser/common.rb
|
528
|
+
- lib/cucumber/parser/common.tt
|
526
529
|
- lib/cucumber/parser/feature.rb
|
527
530
|
- lib/cucumber/parser/feature.tt
|
528
531
|
- lib/cucumber/parser/i18n.tt
|
529
532
|
- lib/cucumber/parser/natural_language.rb
|
533
|
+
- lib/cucumber/parser/py_string.rb
|
534
|
+
- lib/cucumber/parser/py_string.tt
|
530
535
|
- lib/cucumber/parser/table.rb
|
531
536
|
- lib/cucumber/parser/table.tt
|
532
537
|
- lib/cucumber/parser/treetop_ext.rb
|
@@ -638,7 +643,7 @@ post_install_message: |+
|
|
638
643
|
|
639
644
|
(::) U P G R A D I N G (::)
|
640
645
|
|
641
|
-
Thank you for installing cucumber-0.4.
|
646
|
+
Thank you for installing cucumber-0.4.4.
|
642
647
|
Please be sure to read http://wiki.github.com/aslakhellesoy/cucumber/upgrading
|
643
648
|
for important information about this release. Happy cuking!
|
644
649
|
|