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.
Files changed (47) hide show
  1. data/Manifest.txt +22 -10
  2. data/README.textile +147 -17
  3. data/README.txt +41 -0
  4. data/config/hoe.rb +1 -1
  5. data/examples/calculator/features/addition.feature +7 -7
  6. data/examples/calculator/features/division.feature +3 -4
  7. data/examples/calculator/features/steps/{addition_steps.rb → calculator_steps.rb} +0 -1
  8. data/examples/calculator/lib/calculator.rb +2 -4
  9. data/examples/{pure_ruby → calculator_ruby_features}/Rakefile +0 -0
  10. data/examples/{pure_ruby → calculator_ruby_features}/features/addition.rb +2 -2
  11. data/examples/{pure_ruby/features/steps/addition_steps.rb → calculator_ruby_features/features/steps/calculator_steps.rb} +0 -0
  12. data/examples/java/src/cucumber/demo/Hello.java +1 -1
  13. data/examples/{simple_norwegian → norwegian_calculator}/Rakefile +0 -0
  14. data/examples/{simple_norwegian/features/steps/matte_steg.rb.rb → norwegian_calculator/features/kalkulator_steps.rb} +2 -2
  15. data/examples/{simple_norwegian → norwegian_calculator}/features/summering.feature +4 -4
  16. data/examples/{web → watir}/Rakefile +0 -0
  17. data/examples/{web → watir}/features/search.feature +1 -1
  18. data/examples/{web → watir}/features/steps/stories_steps.rb +4 -4
  19. data/gem_tasks/gemspec.rake +6 -0
  20. data/generators/cucumber/cucumber_generator.rb +20 -0
  21. data/generators/cucumber/templates/common_webrat.rb +30 -0
  22. data/generators/cucumber/templates/cucumber.rake +7 -0
  23. data/generators/cucumber/templates/env.rb +6 -0
  24. data/generators/feature/feature_generator.rb +17 -0
  25. data/generators/feature/templates/feature.erb +27 -0
  26. data/generators/feature/templates/steps.erb +22 -0
  27. data/lib/cucumber.rb +9 -1
  28. data/lib/cucumber/cli.rb +13 -8
  29. data/lib/cucumber/executor.rb +0 -4
  30. data/lib/cucumber/formatters/html_formatter.rb +1 -0
  31. data/lib/cucumber/formatters/pretty_formatter.rb +15 -5
  32. data/lib/cucumber/languages.yml +1 -1
  33. data/lib/cucumber/rails/rspec.rb +12 -0
  34. data/lib/cucumber/rails/world.rb +18 -16
  35. data/lib/cucumber/rake/task.rb +17 -14
  36. data/lib/cucumber/step_methods.rb +3 -1
  37. data/lib/cucumber/tree/scenario.rb +6 -0
  38. data/lib/cucumber/tree/step.rb +8 -0
  39. data/lib/cucumber/treetop_parser/feature.treetop.erb +10 -6
  40. data/lib/cucumber/treetop_parser/feature_en.rb +132 -81
  41. data/lib/cucumber/treetop_parser/feature_fr.rb +136 -85
  42. data/lib/cucumber/treetop_parser/feature_no.rb +132 -81
  43. data/lib/cucumber/treetop_parser/feature_pt.rb +132 -81
  44. data/lib/cucumber/version.rb +1 -1
  45. data/spec/cucumber/treetop_parser/feature_parser_spec.rb +40 -0
  46. data/spec/cucumber/treetop_parser/spaces.feature +10 -0
  47. metadata +25 -12
@@ -2,7 +2,7 @@ module Cucumber #:nodoc:
2
2
  class VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- TINY = 2
5
+ TINY = 4
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -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
@@ -0,0 +1,10 @@
1
+ Some title
2
+
3
+ Scenario: first
4
+
5
+ Given a
6
+
7
+ Scenario: second
8
+
9
+ Given b
10
+
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.2
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-07 00:00:00 -07:00
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/addition_steps.rb
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/pure_ruby/Rakefile
96
- - examples/pure_ruby/features/addition.rb
97
- - examples/pure_ruby/features/steps/addition_steps.rb
98
- - examples/simple_norwegian/Rakefile
99
- - examples/simple_norwegian/features/steps/matte_steg.rb.rb
100
- - examples/simple_norwegian/features/summering.feature
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