cucumber 0.7.0.beta.2 → 0.7.0.beta.3
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +10 -0
- data/Rakefile +1 -1
- data/VERSION.yml +1 -1
- data/cucumber.gemspec +6 -6
- data/features/call_many_steps.feature +2 -2
- data/features/language_help.feature +2 -0
- data/lib/cucumber/ast/py_string.rb +3 -3
- data/lib/cucumber/ast/table.rb +4 -0
- data/lib/cucumber/cli/options.rb +3 -0
- data/lib/cucumber/rb_support/rb_step_definition.rb +0 -1
- data/lib/cucumber/step_match.rb +1 -1
- data/lib/cucumber/step_mother.rb +37 -16
- data/spec/cucumber/ast/py_string_spec.rb +2 -2
- data/spec/cucumber/ast/step_spec.rb +1 -1
- metadata +6 -6
data/History.txt
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
== 0.7.0.beta.3 (2010-04-23)
|
2
|
+
|
3
|
+
=== Changed Features
|
4
|
+
* Step Definitions and calling steps from step definitions can again use And and But (was removed in 0.7.0.beta.2) (Aslak Hellesøy)
|
5
|
+
|
6
|
+
== 0.7.0.beta.2 (2010-04-21)
|
7
|
+
|
8
|
+
=== New Features
|
9
|
+
* Depend on Gherkin 1.0.18, which has some bugfixes. (Aslak Hellesøy)
|
10
|
+
|
1
11
|
== 0.7.0.beta.1 (2010-04-20)
|
2
12
|
|
3
13
|
Treetop is gone and replaced with Ragel. The new Ragel parser lives in the gherkin gem.
|
data/Rakefile
CHANGED
@@ -16,7 +16,7 @@ begin
|
|
16
16
|
gem.homepage = "http://cukes.info"
|
17
17
|
gem.authors = ["Aslak Hellesøy"]
|
18
18
|
|
19
|
-
gem.add_dependency 'gherkin', '= 1.0.
|
19
|
+
gem.add_dependency 'gherkin', '= 1.0.20'
|
20
20
|
gem.add_dependency 'term-ansicolor', '>= 1.0.4'
|
21
21
|
gem.add_dependency 'builder', '>= 2.1.2'
|
22
22
|
gem.add_dependency 'diff-lcs', '>= 1.1.2'
|
data/VERSION.yml
CHANGED
data/cucumber.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{cucumber}
|
8
|
-
s.version = "0.7.0.beta.
|
8
|
+
s.version = "0.7.0.beta.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Aslak Helles\303\270y"]
|
12
|
-
s.date = %q{2010-04-
|
12
|
+
s.date = %q{2010-04-23}
|
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}
|
@@ -537,7 +537,7 @@ Gem::Specification.new do |s|
|
|
537
537
|
|
538
538
|
(::) U P G R A D I N G (::)
|
539
539
|
|
540
|
-
Thank you for installing cucumber-0.7.0.beta.
|
540
|
+
Thank you for installing cucumber-0.7.0.beta.3.
|
541
541
|
Please be sure to read http://wiki.github.com/aslakhellesoy/cucumber/upgrading
|
542
542
|
for important information about this release. Happy cuking!
|
543
543
|
|
@@ -714,7 +714,7 @@ for important information about this release. Happy cuking!
|
|
714
714
|
s.specification_version = 3
|
715
715
|
|
716
716
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
717
|
-
s.add_runtime_dependency(%q<gherkin>, ["= 1.0.
|
717
|
+
s.add_runtime_dependency(%q<gherkin>, ["= 1.0.20"])
|
718
718
|
s.add_runtime_dependency(%q<term-ansicolor>, [">= 1.0.4"])
|
719
719
|
s.add_runtime_dependency(%q<builder>, [">= 2.1.2"])
|
720
720
|
s.add_runtime_dependency(%q<diff-lcs>, [">= 1.1.2"])
|
@@ -727,7 +727,7 @@ for important information about this release. Happy cuking!
|
|
727
727
|
s.add_development_dependency(%q<syntax>, [">= 1.0.0"])
|
728
728
|
s.add_development_dependency(%q<spork>, [">= 0.7.5"])
|
729
729
|
else
|
730
|
-
s.add_dependency(%q<gherkin>, ["= 1.0.
|
730
|
+
s.add_dependency(%q<gherkin>, ["= 1.0.20"])
|
731
731
|
s.add_dependency(%q<term-ansicolor>, [">= 1.0.4"])
|
732
732
|
s.add_dependency(%q<builder>, [">= 2.1.2"])
|
733
733
|
s.add_dependency(%q<diff-lcs>, [">= 1.1.2"])
|
@@ -741,7 +741,7 @@ for important information about this release. Happy cuking!
|
|
741
741
|
s.add_dependency(%q<spork>, [">= 0.7.5"])
|
742
742
|
end
|
743
743
|
else
|
744
|
-
s.add_dependency(%q<gherkin>, ["= 1.0.
|
744
|
+
s.add_dependency(%q<gherkin>, ["= 1.0.20"])
|
745
745
|
s.add_dependency(%q<term-ansicolor>, [">= 1.0.4"])
|
746
746
|
s.add_dependency(%q<builder>, [">= 2.1.2"])
|
747
747
|
s.add_dependency(%q<diff-lcs>, [">= 1.1.2"])
|
@@ -24,7 +24,7 @@ Feature: http://gist.github.com/221223
|
|
24
24
|
"""
|
25
25
|
And a file named "features/step_definitions/steps.rb" with:
|
26
26
|
"""
|
27
|
-
|
27
|
+
And /^a multiline string:$/ do |s| x=1
|
28
28
|
raise "I got multiline:\n#{s}"
|
29
29
|
end
|
30
30
|
|
@@ -34,7 +34,7 @@ Feature: http://gist.github.com/221223
|
|
34
34
|
|
35
35
|
Given /^I call a multiline string with (.*)$/ do |s| x=1
|
36
36
|
steps %Q{
|
37
|
-
|
37
|
+
And a multiline string:
|
38
38
|
\"\"\"
|
39
39
|
hello
|
40
40
|
#{s}
|
@@ -49,13 +49,13 @@ module Cucumber
|
|
49
49
|
@string = string
|
50
50
|
end
|
51
51
|
|
52
|
-
def
|
52
|
+
def to_step_definition_arg
|
53
53
|
@string
|
54
54
|
end
|
55
55
|
|
56
56
|
def accept(visitor)
|
57
57
|
return if Cucumber.wants_to_quit
|
58
|
-
visitor.visit_py_string(
|
58
|
+
visitor.visit_py_string(@string)
|
59
59
|
end
|
60
60
|
|
61
61
|
def arguments_replaced(arguments) #:nodoc:
|
@@ -73,7 +73,7 @@ module Cucumber
|
|
73
73
|
|
74
74
|
# For testing only
|
75
75
|
def to_sexp #:nodoc:
|
76
|
-
[:py_string,
|
76
|
+
[:py_string, to_step_definition_arg]
|
77
77
|
end
|
78
78
|
end
|
79
79
|
end
|
data/lib/cucumber/ast/table.rb
CHANGED
data/lib/cucumber/cli/options.rb
CHANGED
@@ -161,6 +161,9 @@ module Cucumber
|
|
161
161
|
"several times, and this represents logical AND. Example: --tags @foo,~@bar --tags @zap.",
|
162
162
|
"This represents the boolean expression (@foo || !@bar) && @zap.",
|
163
163
|
"\n",
|
164
|
+
"Beware that if you want to use several negative tags to exclude several tags",
|
165
|
+
"you have to use logical AND: --tags ~@fixme --tags @buggy.",
|
166
|
+
"\n",
|
164
167
|
"Positive tags can be given a threshold to limit the number of occurrences.",
|
165
168
|
"Example: --tags @qa:3 will fail if there are more than 3 occurrences of the @qa tag.",
|
166
169
|
"This can be practical if you are practicing Kanban or CONWIP.") do |v|
|
data/lib/cucumber/step_match.rb
CHANGED
data/lib/cucumber/step_mother.rb
CHANGED
@@ -188,23 +188,44 @@ module Cucumber
|
|
188
188
|
# Given I have 8 cukes in my belly
|
189
189
|
# Then I should not be thirsty
|
190
190
|
# })
|
191
|
-
def invoke_steps(steps_text,
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
191
|
+
def invoke_steps(steps_text, i18n)
|
192
|
+
lexer = i18n.lexer(Gherkin::Parser::Parser.new(StepInvoker.new(self), true, 'steps'))
|
193
|
+
lexer.scan(steps_text)
|
194
|
+
end
|
195
|
+
|
196
|
+
class StepInvoker
|
197
|
+
def initialize(step_mother)
|
198
|
+
@step_mother = step_mother
|
199
|
+
end
|
200
|
+
|
201
|
+
def step(keyword, name, line)
|
202
|
+
invoke
|
203
|
+
@name = name
|
204
|
+
end
|
205
|
+
|
206
|
+
def py_string(string, line)
|
207
|
+
@multiline = Ast::PyString.new(string)
|
208
|
+
end
|
209
|
+
|
210
|
+
def row(row, line)
|
211
|
+
@rows ||= []
|
212
|
+
@rows << row
|
213
|
+
end
|
214
|
+
|
215
|
+
def eof
|
216
|
+
invoke
|
217
|
+
end
|
218
|
+
|
219
|
+
private
|
220
|
+
|
221
|
+
def invoke
|
222
|
+
if @name
|
223
|
+
@multiline = Ast::Table.new(@rows) if @multiline.nil? && @rows
|
224
|
+
@step_mother.invoke(*[@name, @multiline].compact)
|
225
|
+
@name = nil
|
226
|
+
@multiline = nil
|
227
|
+
@rows = nil
|
205
228
|
end
|
206
|
-
args = [step_name, table_or_string].compact
|
207
|
-
invoke(*args)
|
208
229
|
end
|
209
230
|
end
|
210
231
|
|
@@ -13,7 +13,7 @@ module Cucumber
|
|
13
13
|
it "should return a new py_string with arguments replaced with values" do
|
14
14
|
py_string_with_replaced_arg = @ps.arguments_replaced({'<book>' => 'Life is elsewhere', '<qty>' => '5'})
|
15
15
|
|
16
|
-
py_string_with_replaced_arg.
|
16
|
+
py_string_with_replaced_arg.to_step_definition_arg.should == "Life is elsewhere\n5\n"
|
17
17
|
end
|
18
18
|
|
19
19
|
it "should not change the original py_string" do
|
@@ -26,7 +26,7 @@ module Cucumber
|
|
26
26
|
ps = PyString.new("'<book>'")
|
27
27
|
py_string_with_replaced_arg = ps.arguments_replaced({'<book>' => nil})
|
28
28
|
|
29
|
-
py_string_with_replaced_arg.
|
29
|
+
py_string_with_replaced_arg.to_step_definition_arg.should == "''"
|
30
30
|
end
|
31
31
|
|
32
32
|
it "should recognise when just a subset of a cell is delimited" do
|
@@ -59,7 +59,7 @@ module Cucumber
|
|
59
59
|
cells = invocation_table.cells_rows[1]
|
60
60
|
step_invocation = step.step_invocation_from_cells(cells)
|
61
61
|
|
62
|
-
step_invocation.instance_variable_get('@multiline_arg').
|
62
|
+
step_invocation.instance_variable_get('@multiline_arg').to_step_definition_arg.should == 'taste_juicy color_green'
|
63
63
|
end
|
64
64
|
end
|
65
65
|
end
|
metadata
CHANGED
@@ -7,8 +7,8 @@ version: !ruby/object:Gem::Version
|
|
7
7
|
- 7
|
8
8
|
- 0
|
9
9
|
- beta
|
10
|
-
-
|
11
|
-
version: 0.7.0.beta.
|
10
|
+
- 3
|
11
|
+
version: 0.7.0.beta.3
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- "Aslak Helles\xC3\xB8y"
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2010-04-
|
19
|
+
date: 2010-04-23 00:00:00 +02:00
|
20
20
|
default_executable: cucumber
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
@@ -29,8 +29,8 @@ dependencies:
|
|
29
29
|
segments:
|
30
30
|
- 1
|
31
31
|
- 0
|
32
|
-
-
|
33
|
-
version: 1.0.
|
32
|
+
- 20
|
33
|
+
version: 1.0.20
|
34
34
|
type: :runtime
|
35
35
|
version_requirements: *id001
|
36
36
|
- !ruby/object:Gem::Dependency
|
@@ -718,7 +718,7 @@ post_install_message: |+
|
|
718
718
|
|
719
719
|
(::) U P G R A D I N G (::)
|
720
720
|
|
721
|
-
Thank you for installing cucumber-0.7.0.beta.
|
721
|
+
Thank you for installing cucumber-0.7.0.beta.3.
|
722
722
|
Please be sure to read http://wiki.github.com/aslakhellesoy/cucumber/upgrading
|
723
723
|
for important information about this release. Happy cuking!
|
724
724
|
|