aslakhellesoy-cucumber 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Manifest.txt +22 -10
- data/README.textile +147 -17
- data/README.txt +41 -0
- data/config/hoe.rb +1 -1
- data/examples/calculator/features/addition.feature +7 -7
- data/examples/calculator/features/division.feature +3 -4
- data/examples/calculator/features/steps/{addition_steps.rb → calculator_steps.rb} +0 -1
- data/examples/calculator/lib/calculator.rb +2 -4
- data/examples/{pure_ruby → calculator_ruby_features}/Rakefile +0 -0
- data/examples/{pure_ruby → calculator_ruby_features}/features/addition.rb +2 -2
- data/examples/{pure_ruby/features/steps/addition_steps.rb → calculator_ruby_features/features/steps/calculator_steps.rb} +0 -0
- data/examples/java/src/cucumber/demo/Hello.java +1 -1
- data/examples/{simple_norwegian → norwegian_calculator}/Rakefile +0 -0
- data/examples/{simple_norwegian/features/steps/matte_steg.rb.rb → norwegian_calculator/features/kalkulator_steps.rb} +2 -2
- data/examples/{simple_norwegian → norwegian_calculator}/features/summering.feature +4 -4
- data/examples/{web → watir}/Rakefile +0 -0
- data/examples/{web → watir}/features/search.feature +1 -1
- data/examples/{web → watir}/features/steps/stories_steps.rb +4 -4
- data/gem_tasks/gemspec.rake +6 -0
- data/generators/cucumber/cucumber_generator.rb +20 -0
- data/generators/cucumber/templates/common_webrat.rb +30 -0
- data/generators/cucumber/templates/cucumber.rake +7 -0
- data/generators/cucumber/templates/env.rb +6 -0
- data/generators/feature/feature_generator.rb +17 -0
- data/generators/feature/templates/feature.erb +27 -0
- data/generators/feature/templates/steps.erb +22 -0
- data/lib/cucumber.rb +9 -1
- data/lib/cucumber/cli.rb +13 -8
- data/lib/cucumber/executor.rb +0 -4
- data/lib/cucumber/formatters/html_formatter.rb +1 -0
- data/lib/cucumber/formatters/pretty_formatter.rb +15 -5
- data/lib/cucumber/languages.yml +1 -1
- data/lib/cucumber/rails/rspec.rb +12 -0
- data/lib/cucumber/rails/world.rb +18 -16
- data/lib/cucumber/rake/task.rb +17 -14
- data/lib/cucumber/step_methods.rb +3 -1
- data/lib/cucumber/tree/scenario.rb +6 -0
- data/lib/cucumber/tree/step.rb +8 -0
- data/lib/cucumber/treetop_parser/feature.treetop.erb +10 -6
- data/lib/cucumber/treetop_parser/feature_en.rb +132 -81
- data/lib/cucumber/treetop_parser/feature_fr.rb +136 -85
- data/lib/cucumber/treetop_parser/feature_no.rb +132 -81
- data/lib/cucumber/treetop_parser/feature_pt.rb +132 -81
- data/lib/cucumber/version.rb +1 -1
- data/spec/cucumber/treetop_parser/feature_parser_spec.rb +40 -0
- data/spec/cucumber/treetop_parser/spaces.feature +10 -0
- metadata +25 -12
data/lib/cucumber/version.rb
CHANGED
@@ -0,0 +1,40 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../../spec_helper'
|
2
|
+
|
3
|
+
module Cucumber
|
4
|
+
module TreetopParser
|
5
|
+
describe FeatureParser do
|
6
|
+
it "should parse features with weird spaces" do
|
7
|
+
p = FeatureParser.new
|
8
|
+
f = p.parse_feature(File.dirname(__FILE__) + '/spaces.feature')
|
9
|
+
|
10
|
+
v = Object.new.instance_eval do
|
11
|
+
def visit_header(h)
|
12
|
+
h.should == "Some title"
|
13
|
+
end
|
14
|
+
|
15
|
+
def visit_scenario(h)
|
16
|
+
def self.visit_scenario(h)
|
17
|
+
h.name.should == "second"
|
18
|
+
h.accept(self)
|
19
|
+
end
|
20
|
+
|
21
|
+
h.name.should == "first"
|
22
|
+
h.accept(self)
|
23
|
+
end
|
24
|
+
|
25
|
+
def visit_step(s)
|
26
|
+
def self.visit_step(s)
|
27
|
+
s.name.should == "b"
|
28
|
+
end
|
29
|
+
|
30
|
+
s.name.should == "a"
|
31
|
+
end
|
32
|
+
|
33
|
+
self
|
34
|
+
end
|
35
|
+
|
36
|
+
f.accept(v)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
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.
|
4
|
+
version: 0.1.3
|
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: 2008-08-
|
12
|
+
date: 2008-08-21 00:00:00 -07:00
|
13
13
|
default_executable: cucumber
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -68,6 +68,7 @@ extra_rdoc_files:
|
|
68
68
|
- History.txt
|
69
69
|
- License.txt
|
70
70
|
- Manifest.txt
|
71
|
+
- README.txt
|
71
72
|
- TODO.txt
|
72
73
|
- website/index.txt
|
73
74
|
files:
|
@@ -75,6 +76,7 @@ files:
|
|
75
76
|
- License.txt
|
76
77
|
- Manifest.txt
|
77
78
|
- README.textile
|
79
|
+
- README.txt
|
78
80
|
- Rakefile
|
79
81
|
- TODO.txt
|
80
82
|
- bin/cucumber
|
@@ -83,8 +85,11 @@ files:
|
|
83
85
|
- examples/calculator/Rakefile
|
84
86
|
- examples/calculator/features/addition.feature
|
85
87
|
- examples/calculator/features/division.feature
|
86
|
-
- examples/calculator/features/steps/
|
88
|
+
- examples/calculator/features/steps/calculator_steps.rb
|
87
89
|
- examples/calculator/lib/calculator.rb
|
90
|
+
- examples/calculator_ruby_features/Rakefile
|
91
|
+
- examples/calculator_ruby_features/features/addition.rb
|
92
|
+
- examples/calculator_ruby_features/features/steps/calculator_steps.rb
|
88
93
|
- examples/java/README.textile
|
89
94
|
- examples/java/Rakefile
|
90
95
|
- examples/java/features/hello.feature
|
@@ -92,21 +97,26 @@ files:
|
|
92
97
|
- examples/java/features/steps/tree_steps.rb
|
93
98
|
- examples/java/features/tree.feature
|
94
99
|
- examples/java/src/cucumber/demo/Hello.java
|
95
|
-
- examples/
|
96
|
-
- examples/
|
97
|
-
- examples/
|
98
|
-
- examples/
|
99
|
-
- examples/
|
100
|
-
- examples/
|
101
|
-
- examples/web/Rakefile
|
102
|
-
- examples/web/features/search.feature
|
103
|
-
- examples/web/features/steps/stories_steps.rb
|
100
|
+
- examples/norwegian_calculator/Rakefile
|
101
|
+
- examples/norwegian_calculator/features/kalkulator_steps.rb
|
102
|
+
- examples/norwegian_calculator/features/summering.feature
|
103
|
+
- examples/watir/Rakefile
|
104
|
+
- examples/watir/features/search.feature
|
105
|
+
- examples/watir/features/steps/stories_steps.rb
|
104
106
|
- gem_tasks/deployment.rake
|
105
107
|
- gem_tasks/environment.rake
|
106
108
|
- gem_tasks/fix_cr_lf.rake
|
109
|
+
- gem_tasks/gemspec.rake
|
107
110
|
- gem_tasks/rspec.rake
|
108
111
|
- gem_tasks/treetop.rake
|
109
112
|
- gem_tasks/website.rake
|
113
|
+
- generators/cucumber/cucumber_generator.rb
|
114
|
+
- generators/cucumber/templates/common_webrat.rb
|
115
|
+
- generators/cucumber/templates/cucumber.rake
|
116
|
+
- generators/cucumber/templates/env.rb
|
117
|
+
- generators/feature/feature_generator.rb
|
118
|
+
- generators/feature/templates/feature.erb
|
119
|
+
- generators/feature/templates/steps.erb
|
110
120
|
- lib/cucumber.rb
|
111
121
|
- lib/cucumber/cli.rb
|
112
122
|
- lib/cucumber/core_ext/proc.rb
|
@@ -118,6 +128,7 @@ files:
|
|
118
128
|
- lib/cucumber/formatters/pretty_formatter.rb
|
119
129
|
- lib/cucumber/formatters/progress_formatter.rb
|
120
130
|
- lib/cucumber/languages.yml
|
131
|
+
- lib/cucumber/rails/rspec.rb
|
121
132
|
- lib/cucumber/rails/world.rb
|
122
133
|
- lib/cucumber/rake/task.rb
|
123
134
|
- lib/cucumber/step_methods.rb
|
@@ -151,6 +162,8 @@ files:
|
|
151
162
|
- spec/cucumber/formatters/features.html
|
152
163
|
- spec/cucumber/formatters/html_formatter_spec.rb
|
153
164
|
- spec/cucumber/sell_cucumbers.feature
|
165
|
+
- spec/cucumber/treetop_parser/feature_parser_spec.rb
|
166
|
+
- spec/cucumber/treetop_parser/spaces.feature
|
154
167
|
- spec/spec.opts
|
155
168
|
- spec/spec_helper.rb
|
156
169
|
- website/index.html
|