aslakhellesoy-cucumber 0.1.99.13 → 0.1.99.14
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 +1 -1
- data/Manifest.txt +1 -2
- data/examples/self_test/Rakefile +6 -0
- data/features/cucumber_cli_outlines.feature +2 -2
- data/gem_tasks/gemspec.rake +2 -2
- data/lib/cucumber/ast/examples.rb +4 -0
- data/lib/cucumber/ast/scenario_outline.rb +6 -0
- data/lib/cucumber/ast/step.rb +19 -1
- data/lib/cucumber/ast/table.rb +4 -0
- data/lib/cucumber/formatter/console.rb +12 -9
- data/lib/cucumber/version.rb +1 -1
- metadata +2 -1
data/History.txt
CHANGED
@@ -75,7 +75,7 @@ pure Ruby users have been enjoying for a while.
|
|
75
75
|
* Pending steps in > steps called from steps (#65 Aslak Hellesøy)
|
76
76
|
|
77
77
|
=== New features
|
78
|
-
* Keywords can be aliased in languages.yml. See English for an example (
|
78
|
+
* Keywords can be aliased in languages.yml. See English for an example (examples: Examples|Scenarios)
|
79
79
|
* Adding support for Background (#153 Joseph Wilk)
|
80
80
|
* Added Česky/Czech (Vojtech Salbaba)
|
81
81
|
* New --no-multiline option to reduce noise. Useful if lots of features are failing.
|
data/Manifest.txt
CHANGED
@@ -117,6 +117,7 @@ examples/selenium/Rakefile
|
|
117
117
|
examples/selenium/features/search.feature
|
118
118
|
examples/selenium/features/step_definitons/stories_steps.rb
|
119
119
|
examples/self_test/README.textile
|
120
|
+
examples/self_test/Rakefile
|
120
121
|
examples/self_test/features/background/failing_background.feature
|
121
122
|
examples/self_test/features/background/failing_background_after_success.feature
|
122
123
|
examples/self_test/features/background/multiline_args_background.feature
|
@@ -217,7 +218,6 @@ lib/cucumber/rake/task.rb
|
|
217
218
|
lib/cucumber/step_definition.rb
|
218
219
|
lib/cucumber/step_mother.rb
|
219
220
|
lib/cucumber/version.rb
|
220
|
-
pom.xml
|
221
221
|
rails_generators/cucumber/USAGE
|
222
222
|
rails_generators/cucumber/cucumber_generator.rb
|
223
223
|
rails_generators/cucumber/templates/cucumber
|
@@ -272,4 +272,3 @@ spec/cucumber/treetop_parser/with_tags.feature
|
|
272
272
|
spec/cucumber/world/pending_spec.rb
|
273
273
|
spec/spec.opts
|
274
274
|
spec/spec_helper.rb
|
275
|
-
src/main/java/cukes/Cucumber.java
|
@@ -43,8 +43,8 @@ Feature: Cucumber command line
|
|
43
43
|
Feature: Outline Sample
|
44
44
|
|
45
45
|
Scenario Outline: Test state # features/outline_sample.feature:5
|
46
|
-
Given <state> without a table
|
47
|
-
Given <other_state> without a table
|
46
|
+
Given <state> without a table # features/step_definitions/sample_steps.rb:12
|
47
|
+
Given <other_state> without a table # features/step_definitions/sample_steps.rb:12
|
48
48
|
|
49
49
|
Examples: Rainbow colours
|
50
50
|
| state | other_state |
|
data/gem_tasks/gemspec.rake
CHANGED
@@ -4,7 +4,7 @@ namespace :gemspec do
|
|
4
4
|
File.open('cucumber.gemspec', 'w') {|io| io.write($hoe.spec.to_ruby)}
|
5
5
|
puts "1) git commit -a -m \"Release #{Cucumber::VERSION::STRING}\""
|
6
6
|
puts "2) git tag -a \"v#{Cucumber::VERSION::STRING}\" -m \"Release #{Cucumber::VERSION::STRING}\""
|
7
|
-
puts "3) git push
|
8
|
-
puts "4)
|
7
|
+
puts "3) git push"
|
8
|
+
puts "4) git push --tags"
|
9
9
|
end
|
10
10
|
end
|
data/lib/cucumber/ast/step.rb
CHANGED
@@ -26,13 +26,31 @@ module Cucumber
|
|
26
26
|
|
27
27
|
def accept(visitor)
|
28
28
|
execute(visitor)
|
29
|
-
|
29
|
+
|
30
|
+
if @status == :outline
|
31
|
+
step_definition = find_first_name_and_step_definition_from_examples(visitor)
|
32
|
+
else
|
33
|
+
step_definition = @step_definition
|
34
|
+
end
|
35
|
+
visitor.visit_step_name(@keyword, @name, @status, step_definition, source_indent)
|
30
36
|
@multiline_args.each do |multiline_arg|
|
31
37
|
visitor.visit_multiline_arg(multiline_arg, @status)
|
32
38
|
end
|
33
39
|
@exception
|
34
40
|
end
|
35
41
|
|
42
|
+
def find_first_name_and_step_definition_from_examples(visitor)
|
43
|
+
# @scenario is always a ScenarioOutline in this case
|
44
|
+
@scenario.each_example_row do |cells|
|
45
|
+
argument_hash = cells.to_hash
|
46
|
+
delimited_arguments = delimit_argument_names(argument_hash)
|
47
|
+
name = replace_name_arguments(delimited_arguments)
|
48
|
+
step_definition = visitor.step_definition(name) rescue nil
|
49
|
+
return step_definition if step_definition
|
50
|
+
end
|
51
|
+
nil
|
52
|
+
end
|
53
|
+
|
36
54
|
def to_sexp
|
37
55
|
[:step, @line, @keyword, @name, *@multiline_args.map{|arg| arg.to_sexp}]
|
38
56
|
end
|
data/lib/cucumber/ast/table.rb
CHANGED
@@ -7,17 +7,20 @@ module Cucumber
|
|
7
7
|
FORMATS = Hash.new{|hash, format| hash[format] = method(format).to_proc}
|
8
8
|
|
9
9
|
def format_step(keyword, step_name, status, step_definition, source_indent)
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
format_string(c, :comment)
|
14
|
-
else
|
15
|
-
''
|
16
|
-
end
|
17
|
-
keyword + " " + step_definition.format_args(step_name, format_for(status, :param)) + comment
|
10
|
+
comment = if source_indent
|
11
|
+
c = (' # ' + step_definition.file_colon_line).indent(source_indent)
|
12
|
+
format_string(c, :comment)
|
18
13
|
else
|
19
|
-
|
14
|
+
''
|
20
15
|
end
|
16
|
+
|
17
|
+
begin
|
18
|
+
line = keyword + " " + step_definition.format_args(step_name, format_for(status, :param)) + comment
|
19
|
+
rescue
|
20
|
+
# It didn't match. This often happens for :outline steps
|
21
|
+
line = keyword + " " + step_name + comment
|
22
|
+
end
|
23
|
+
|
21
24
|
format_string(line, status)
|
22
25
|
end
|
23
26
|
|
data/lib/cucumber/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aslakhellesoy-cucumber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.99.
|
4
|
+
version: 0.1.99.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "Aslak Helles\xC3\xB8y"
|
@@ -181,6 +181,7 @@ files:
|
|
181
181
|
- examples/selenium/features/search.feature
|
182
182
|
- examples/selenium/features/step_definitons/stories_steps.rb
|
183
183
|
- examples/self_test/README.textile
|
184
|
+
- examples/self_test/Rakefile
|
184
185
|
- examples/self_test/features/background/failing_background.feature
|
185
186
|
- examples/self_test/features/background/failing_background_after_success.feature
|
186
187
|
- examples/self_test/features/background/multiline_args_background.feature
|