aslakhellesoy-cucumber 0.0.1 → 0.1.1

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.
Files changed (70) hide show
  1. data/License.txt +1 -1
  2. data/Manifest.txt +38 -24
  3. data/README.textile +31 -0
  4. data/TODO.txt +30 -0
  5. data/config/hoe.rb +6 -7
  6. data/examples/java/README.textile +52 -0
  7. data/examples/java/Rakefile +12 -0
  8. data/examples/java/features/hello.feature +11 -0
  9. data/examples/java/features/steps/hello_steps.rb +25 -0
  10. data/examples/java/features/steps/tree_steps.rb +14 -0
  11. data/examples/java/features/tree.feature +9 -0
  12. data/examples/java/src/cucumber/demo/Hello.java +15 -0
  13. data/examples/pure_ruby/Rakefile +6 -0
  14. data/examples/pure_ruby/features/addition.rb +23 -0
  15. data/examples/pure_ruby/{steps → features/steps}/addition_steps.rb +0 -0
  16. data/examples/simple_norwegian/Rakefile +6 -0
  17. data/examples/simple_norwegian/{steg → features/steps}/matte_steg.rb.rb +0 -0
  18. data/examples/simple_norwegian/{summering.story → features/summering.feature} +4 -1
  19. data/examples/web/Rakefile +6 -0
  20. data/examples/web/features/search.feature +9 -0
  21. data/examples/web/features/steps/stories_steps.rb +51 -0
  22. data/gem_tasks/treetop.rake +8 -14
  23. data/lib/cucumber.rb +10 -3
  24. data/lib/cucumber/cli.rb +29 -19
  25. data/lib/cucumber/core_ext/proc.rb +13 -5
  26. data/lib/cucumber/executor.rb +8 -10
  27. data/lib/cucumber/formatters/ansicolor.rb +2 -2
  28. data/lib/cucumber/formatters/html_formatter.rb +6 -6
  29. data/lib/cucumber/formatters/pretty_formatter.rb +68 -15
  30. data/lib/cucumber/{parser/languages.yml → languages.yml} +0 -4
  31. data/lib/cucumber/rake/task.rb +24 -26
  32. data/lib/cucumber/step_mother.rb +3 -3
  33. data/lib/cucumber/tree.rb +8 -117
  34. data/lib/cucumber/tree/feature.rb +45 -0
  35. data/lib/cucumber/tree/features.rb +21 -0
  36. data/lib/cucumber/tree/scenario.rb +79 -0
  37. data/lib/cucumber/tree/step.rb +133 -0
  38. data/lib/cucumber/tree/table.rb +26 -0
  39. data/lib/cucumber/{parser → tree}/top_down_visitor.rb +5 -8
  40. data/lib/cucumber/treetop_parser/feature.treetop.erb +98 -0
  41. data/lib/cucumber/treetop_parser/feature_en.rb +923 -0
  42. data/lib/cucumber/treetop_parser/feature_fr.rb +923 -0
  43. data/lib/cucumber/treetop_parser/feature_no.rb +923 -0
  44. data/lib/cucumber/treetop_parser/feature_parser.rb +32 -0
  45. data/lib/cucumber/treetop_parser/feature_pt.rb +923 -0
  46. data/lib/cucumber/version.rb +2 -2
  47. data/script/console +1 -1
  48. data/spec/cucumber/executor_spec.rb +9 -9
  49. data/spec/cucumber/formatters/{stories.html → features.html} +9 -9
  50. data/spec/cucumber/formatters/html_formatter_spec.rb +11 -11
  51. data/spec/cucumber/{sell_cucumbers.story → sell_cucumbers.feature} +1 -1
  52. data/spec/spec_helper.rb +8 -1
  53. metadata +61 -30
  54. data/README.txt +0 -78
  55. data/examples/Rakefile +0 -7
  56. data/examples/pure_ruby/addition.rb +0 -16
  57. data/examples/simple/addition.story +0 -12
  58. data/examples/simple/division.story +0 -17
  59. data/examples/simple/steps/addition_steps.rb +0 -43
  60. data/examples/web/run_stories.story +0 -10
  61. data/examples/web/steps/stories_steps.rb +0 -39
  62. data/lib/cucumber/parser/nodes.rb +0 -88
  63. data/lib/cucumber/parser/story_parser.rb +0 -13
  64. data/lib/cucumber/parser/story_parser.treetop.erb +0 -41
  65. data/lib/cucumber/parser/story_parser_en.rb +0 -554
  66. data/lib/cucumber/parser/story_parser_fr.rb +0 -554
  67. data/lib/cucumber/parser/story_parser_no.rb +0 -554
  68. data/lib/cucumber/parser/story_parser_pt.rb +0 -554
  69. data/lib/cucumber/ruby_tree.rb +0 -14
  70. data/lib/cucumber/ruby_tree/nodes.rb +0 -68
@@ -1,7 +1,7 @@
1
1
  module Cucumber #:nodoc:
2
- module VERSION #:nodoc:
2
+ class VERSION #:nodoc:
3
3
  MAJOR = 0
4
- MINOR = 0
4
+ MINOR = 1
5
5
  TINY = 1
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
@@ -6,5 +6,5 @@ libs = " -r irb/completion"
6
6
  # Perhaps use a console_lib to store any extra methods I may want available in the cosole
7
7
  # libs << " -r #{File.dirname(__FILE__) + '/../lib/console_lib/console_logger.rb'}"
8
8
  libs << " -r #{File.dirname(__FILE__) + '/../lib/cucumber.rb'}"
9
- puts "Loading cucumber gem"
9
+ visit_feature "Loading cucumber gem"
10
10
  exec "#{irb} #{libs} --simple-prompt"
@@ -8,17 +8,17 @@ module Cucumber
8
8
  @f = Formatters::ProgressFormatter.new(@io)
9
9
  @m = StepMother.new
10
10
  @r = Executor.new(@f, @m)
11
- @story_file = File.dirname(__FILE__) + '/sell_cucumbers.story'
12
- @parser = Parser::StoryParser.new
13
- @stories = Tree::Stories.new
14
- @stories << Parser::StoryNode.parse(@story_file, @parser)
11
+ @feature_file = File.dirname(__FILE__) + '/sell_cucumbers.feature'
12
+ @parser = TreetopParser::FeatureParser.new
13
+ @features = Tree::Features.new
14
+ @features << @parser.parse_feature(@feature_file)
15
15
  end
16
16
 
17
17
  it "should pass when blocks are ok" do
18
18
  @m.register_step_proc(/there are (\d*) cucumbers/) { |n| @n = n.to_i }
19
19
  @m.register_step_proc(/I sell (\d*) cucumbers/) { |n| @n -= n.to_i }
20
20
  @m.register_step_proc(/I should owe (\d*) cucumbers/) { |n| @n.should == -n.to_i }
21
- @r.visit_stories(@stories)
21
+ @r.visit_features(@features)
22
22
  @f.dump
23
23
  @io.string.should == (<<-STDOUT).strip
24
24
  \e[0m\e[1m\e[32m.\e[0m\e[0m\e[0m\e[1m\e[32m.\e[0m\e[0m\e[0m\e[1m\e[32m.\e[0m\e[0m\e[0m\e[1m\e[31m\n\e[0m\e[0m\e[1m\e[31m
@@ -27,18 +27,18 @@ STDOUT
27
27
 
28
28
  end
29
29
 
30
- it "should print filtered backtrace with story line" do
30
+ it "should print filtered backtrace with feature line" do
31
31
  @m.register_step_proc(/there are (\d*) cucumbers/) { |n| @n = n }
32
32
  @m.register_step_proc(/I sell (\d*) cucumbers/) { |n| @n = n }
33
33
  @m.register_step_proc(/I should owe (\d*) cucumbers/) { |n| raise "dang" }
34
- @r.visit_stories(@stories)
34
+ @r.visit_features(@features)
35
35
  @io.string.should == (<<-STDOUT).strip
36
36
  \e[0m\e[1m\e[32m.\e[0m\e[0m\e[0m\e[1m\e[32m.\e[0m\e[0m\e[0m\e[1m\e[31mF\e[0m\e[0m\e[0m\e[1m\e[31m
37
37
 
38
38
  1)
39
39
  dang
40
40
  #{__FILE__}:33:in `Then /I should owe (\\d*) cucumbers/'
41
- #{@story_file}:9:in `Then I should owe 7 cucumbers'
41
+ #{@feature_file}:9:in `Then I should owe 7 cucumbers'
42
42
  \e[0m
43
43
  STDOUT
44
44
  end
@@ -47,7 +47,7 @@ STDOUT
47
47
  # @r.register_step_proc("call me please") { @x = 1 }
48
48
  # @r.register_step_proc("I will call you") { @r.register_step_proc("call me please") }
49
49
  # @r.register_step_proc(/I should owe (\d*) cucumbers/) { |n| @n.should == -n.to_i }
50
- # @story.accept(@r)
50
+ # @feature.accept(@r)
51
51
  # @f.dump
52
52
  # @io.string.should == "...\n"
53
53
  # end
@@ -191,8 +191,8 @@ div.auto_complete ul li.selected {
191
191
  </head>
192
192
  <body>
193
193
  <div id="container">
194
- <dl class="story new">
195
- <dt>Story: Addition
194
+ <dl class="feature new">
195
+ <dt>Feature: Addition
196
196
  </dt>
197
197
  <dd>
198
198
  <p>
@@ -215,8 +215,8 @@ div.auto_complete ul li.selected {
215
215
  </dl>
216
216
  </dd>
217
217
  </dl>
218
- <dl class="story new">
219
- <dt>Story: Division
218
+ <dl class="feature new">
219
+ <dt>Feature: Division
220
220
  </dt>
221
221
  <dd>
222
222
  <p>
@@ -252,23 +252,23 @@ div.auto_complete ul li.selected {
252
252
  </div>
253
253
  <script type="text/javascript">stepPending(0)</script>
254
254
  <script type="text/javascript">stepFailed(1, (<r><![CDATA[This one failed]]></r>).toString(), (<r><![CDATA[./spec/cucumber/formatters/html_formatter_spec.rb:20:in `Given WHATEVER'
255
- ./spec/cucumber/formatters/../../../examples/simple/addition.story:8:in `Given foo bar']]></r>).toString())</script>
255
+ ./spec/cucumber/formatters/../../../examples/simple/addition.feature:8:in `Given foo bar']]></r>).toString())</script>
256
256
  <script type="text/javascript">stepPassed(2)</script>
257
257
  <script type="text/javascript">stepPending(3)</script>
258
258
  <script type="text/javascript">stepFailed(4, (<r><![CDATA[This one failed]]></r>).toString(), (<r><![CDATA[./spec/cucumber/formatters/html_formatter_spec.rb:20:in `Then WHATEVER'
259
- ./spec/cucumber/formatters/../../../examples/simple/addition.story:11:in `Then the result should be 12 on the screen']]></r>).toString())</script>
259
+ ./spec/cucumber/formatters/../../../examples/simple/addition.feature:11:in `Then the result should be 12 on the screen']]></r>).toString())</script>
260
260
  <script type="text/javascript">stepPassed(5)</script>
261
261
  <script type="text/javascript">stepPending(6)</script>
262
262
  <script type="text/javascript">stepFailed(7, (<r><![CDATA[This one failed]]></r>).toString(), (<r><![CDATA[./spec/cucumber/formatters/html_formatter_spec.rb:20:in `And WHATEVER'
263
- ./spec/cucumber/formatters/../../../examples/simple/division.story:8:in `And I have entered 2 into the calculator']]></r>).toString())</script>
263
+ ./spec/cucumber/formatters/../../../examples/simple/division.feature:8:in `And I have entered 2 into the calculator']]></r>).toString())</script>
264
264
  <script type="text/javascript">stepPassed(8)</script>
265
265
  <script type="text/javascript">stepPending(9)</script>
266
266
  <script type="text/javascript">stepFailed(10, (<r><![CDATA[This one failed]]></r>).toString(), (<r><![CDATA[./spec/cucumber/formatters/html_formatter_spec.rb:20:in `And WHATEVER'
267
- ./spec/cucumber/formatters/../../../examples/simple/division.story:11:in `And the result class should be Float']]></r>).toString())</script>
267
+ ./spec/cucumber/formatters/../../../examples/simple/division.feature:11:in `And the result class should be Float']]></r>).toString())</script>
268
268
  <script type="text/javascript">stepPassed(11)</script>
269
269
  <script type="text/javascript">stepPending(12)</script>
270
270
  <script type="text/javascript">stepFailed(13, (<r><![CDATA[This one failed]]></r>).toString(), (<r><![CDATA[./spec/cucumber/formatters/html_formatter_spec.rb:20:in `When WHATEVER'
271
- ./spec/cucumber/formatters/../../../examples/simple/division.story:16:in `When I divide']]></r>).toString())</script>
271
+ ./spec/cucumber/formatters/../../../examples/simple/division.feature:16:in `When I divide']]></r>).toString())</script>
272
272
  <script type="text/javascript">stepPassed(14)</script>
273
273
  </body>
274
274
  </html>
@@ -1,10 +1,10 @@
1
1
  require File.dirname(__FILE__) + '/../../spec_helper'
2
2
  require 'stringio'
3
- require 'cucumber/parser/top_down_visitor'
3
+ require 'cucumber/tree/top_down_visitor'
4
4
 
5
5
  module Cucumber
6
6
  module Formatters
7
- class MiniExecutor < Cucumber::Parser::TopDownVisitor
7
+ class MiniExecutor < Cucumber::Tree::TopDownVisitor
8
8
  def initialize(f)
9
9
  @f = f
10
10
  end
@@ -12,7 +12,7 @@ module Cucumber
12
12
  def visit_step(step)
13
13
  if step.regexp == //
14
14
  # Just make sure there are some params so we can get <span>s
15
- proc = lambda do
15
+ proc = lambda do |_|
16
16
  case(step.id % 3)
17
17
  when 0
18
18
  raise Pending
@@ -35,10 +35,10 @@ module Cucumber
35
35
  SIMPLE_DIR = File.dirname(__FILE__) + '/../../../examples/simple'
36
36
 
37
37
  before do
38
- p = Parser::StoryParser.new
39
- @stories = Tree::Stories.new
40
- Dir["#{SIMPLE_DIR}/*.story"].each do |f|
41
- @stories << Parser::StoryNode.parse(f, p)
38
+ p = Cucumber::TreetopParser::FeatureParser.new
39
+ @features = Tree::Features.new
40
+ Dir["#{SIMPLE_DIR}/*.feature"].each do |f|
41
+ @features << p.parse_feature(f)
42
42
  end
43
43
  @io = StringIO.new
44
44
  @formatter = HtmlFormatter.new(@io)
@@ -46,11 +46,11 @@ module Cucumber
46
46
  end
47
47
 
48
48
  it "should render HTML" do
49
- @me.visit_stories(@stories) # set regexp+proc+args and execute
50
- @formatter.visit_stories(@stories)
51
- @me.visit_stories(@stories) # output result of execution
49
+ @me.visit_features(@features) # set regexp+proc+args and execute
50
+ @formatter.visit_features(@features)
51
+ @me.visit_features(@features) # output result of execution
52
52
  @formatter.dump
53
- expected_html = File.dirname(__FILE__) + '/stories.html'
53
+ expected_html = File.dirname(__FILE__) + '/features.html'
54
54
  #File.open(expected_html, 'w') {|io| io.write(@io.string)}
55
55
  @io.string.should eql(IO.read(expected_html))
56
56
  end
@@ -1,4 +1,4 @@
1
- Story: Sell cucumbers
1
+ Feature: Sell cucumbers
2
2
  As a cucumber farmer
3
3
  I want to sell cucumbers
4
4
  So that I buy meat
@@ -4,4 +4,11 @@ require 'spec'
4
4
 
5
5
  $:.unshift(File.dirname(__FILE__) + '/../lib')
6
6
  require 'cucumber'
7
- require 'cucumber/parser/story_parser_en'
7
+ require 'cucumber/treetop_parser/feature_en'
8
+
9
+ # Prevent CLI's exit hook from running
10
+ class Cucumber::CLI
11
+ def self.execute_called?
12
+ true
13
+ end
14
+ 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.0.1
4
+ version: 0.1.1
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-07-09 00:00:00 -07:00
12
+ date: 2008-08-06 00:00:00 -07:00
13
13
  default_executable: cucumber
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -30,6 +30,24 @@ dependencies:
30
30
  - !ruby/object:Gem::Version
31
31
  version: 1.2.4
32
32
  version:
33
+ - !ruby/object:Gem::Dependency
34
+ name: rspec
35
+ version_requirement:
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 1.1.4
41
+ version:
42
+ - !ruby/object:Gem::Dependency
43
+ name: diff-lcs
44
+ version_requirement:
45
+ version_requirements: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: 1.1.2
50
+ version:
33
51
  - !ruby/object:Gem::Dependency
34
52
  name: hoe
35
53
  version_requirement:
@@ -39,7 +57,7 @@ dependencies:
39
57
  - !ruby/object:Gem::Version
40
58
  version: 1.7.0
41
59
  version:
42
- description: Executable user stories
60
+ description: Executable Feature scenarios
43
61
  email:
44
62
  - aslak.hellesoy@gmail.com
45
63
  executables:
@@ -50,27 +68,38 @@ extra_rdoc_files:
50
68
  - History.txt
51
69
  - License.txt
52
70
  - Manifest.txt
53
- - README.txt
71
+ - TODO.txt
54
72
  - website/index.txt
55
73
  files:
56
74
  - History.txt
57
75
  - License.txt
58
76
  - Manifest.txt
59
- - README.txt
77
+ - README.textile
60
78
  - Rakefile
79
+ - TODO.txt
61
80
  - bin/cucumber
62
81
  - config/hoe.rb
63
82
  - config/requirements.rb
64
- - examples/Rakefile
65
- - examples/pure_ruby/addition.rb
66
- - examples/pure_ruby/steps/addition_steps.rb
67
- - examples/simple/addition.story
68
- - examples/simple/division.story
69
- - examples/simple/steps/addition_steps.rb
70
- - examples/simple_norwegian/steg/matte_steg.rb.rb
71
- - examples/simple_norwegian/summering.story
72
- - examples/web/run_stories.story
73
- - examples/web/steps/stories_steps.rb
83
+ - examples/java/README.textile
84
+ - examples/java/Rakefile
85
+ - examples/java/features/hello.feature
86
+ - examples/java/features/steps/hello_steps.rb
87
+ - examples/java/features/steps/tree_steps.rb
88
+ - examples/java/features/tree.feature
89
+ - examples/java/src/cucumber/demo/Hello.java
90
+ - examples/pure_ruby/Rakefile
91
+ - examples/pure_ruby/features/addition.rb
92
+ - examples/pure_ruby/features/steps/addition_steps.rb
93
+ - examples/simple/Rakefile
94
+ - examples/simple/features/addition.feature
95
+ - examples/simple/features/division.feature
96
+ - examples/simple/features/steps/addition_steps.rb
97
+ - examples/simple_norwegian/Rakefile
98
+ - examples/simple_norwegian/features/steps/matte_steg.rb.rb
99
+ - examples/simple_norwegian/features/summering.feature
100
+ - examples/web/Rakefile
101
+ - examples/web/features/search.feature
102
+ - examples/web/features/steps/stories_steps.rb
74
103
  - gem_tasks/deployment.rake
75
104
  - gem_tasks/environment.rake
76
105
  - gem_tasks/fix_cr_lf.rake
@@ -87,22 +116,24 @@ files:
87
116
  - lib/cucumber/formatters/html_formatter.rb
88
117
  - lib/cucumber/formatters/pretty_formatter.rb
89
118
  - lib/cucumber/formatters/progress_formatter.rb
90
- - lib/cucumber/parser/languages.yml
91
- - lib/cucumber/parser/nodes.rb
92
- - lib/cucumber/parser/story_parser.rb
93
- - lib/cucumber/parser/story_parser.treetop.erb
94
- - lib/cucumber/parser/story_parser_en.rb
95
- - lib/cucumber/parser/story_parser_fr.rb
96
- - lib/cucumber/parser/story_parser_no.rb
97
- - lib/cucumber/parser/story_parser_pt.rb
98
- - lib/cucumber/parser/top_down_visitor.rb
119
+ - lib/cucumber/languages.yml
99
120
  - lib/cucumber/rails/world.rb
100
121
  - lib/cucumber/rake/task.rb
101
- - lib/cucumber/ruby_tree.rb
102
- - lib/cucumber/ruby_tree/nodes.rb
103
122
  - lib/cucumber/step_methods.rb
104
123
  - lib/cucumber/step_mother.rb
105
124
  - lib/cucumber/tree.rb
125
+ - lib/cucumber/tree/feature.rb
126
+ - lib/cucumber/tree/features.rb
127
+ - lib/cucumber/tree/scenario.rb
128
+ - lib/cucumber/tree/step.rb
129
+ - lib/cucumber/tree/table.rb
130
+ - lib/cucumber/tree/top_down_visitor.rb
131
+ - lib/cucumber/treetop_parser/feature.treetop.erb
132
+ - lib/cucumber/treetop_parser/feature_en.rb
133
+ - lib/cucumber/treetop_parser/feature_fr.rb
134
+ - lib/cucumber/treetop_parser/feature_no.rb
135
+ - lib/cucumber/treetop_parser/feature_parser.rb
136
+ - lib/cucumber/treetop_parser/feature_pt.rb
106
137
  - lib/cucumber/version.rb
107
138
  - script/console
108
139
  - script/console.cmd
@@ -116,9 +147,9 @@ files:
116
147
  - spec/cucumber/core_ext/string_spec.rb
117
148
  - spec/cucumber/executor_spec.rb
118
149
  - spec/cucumber/formatters/ansicolor_spec.rb
150
+ - spec/cucumber/formatters/features.html
119
151
  - spec/cucumber/formatters/html_formatter_spec.rb
120
- - spec/cucumber/formatters/stories.html
121
- - spec/cucumber/sell_cucumbers.story
152
+ - spec/cucumber/sell_cucumbers.feature
122
153
  - spec/spec.opts
123
154
  - spec/spec_helper.rb
124
155
  - website/index.html
@@ -127,7 +158,7 @@ files:
127
158
  - website/stylesheets/screen.css
128
159
  - website/template.html.erb
129
160
  has_rdoc: true
130
- homepage: http://cucumber.rubyforge.org
161
+ homepage: http://github.com/aslakhellesoy/cucumber
131
162
  post_install_message:
132
163
  rdoc_options:
133
164
  - --main
@@ -152,6 +183,6 @@ rubyforge_project: cucumber
152
183
  rubygems_version: 1.2.0
153
184
  signing_key:
154
185
  specification_version: 2
155
- summary: Executable user stories
186
+ summary: Executable Feature scenarios
156
187
  test_files: []
157
188
 
data/README.txt DELETED
@@ -1,78 +0,0 @@
1
- = cucumber
2
-
3
- * FIX http://rspec.info/cucumber
4
-
5
- == DESCRIPTION:
6
-
7
- This code parses RSpec stories. It uses a Treetop grammar to do the job, and
8
- this grammar is extended by users of the library. This design makes the code
9
- very compact, and it makes it easy to give precise line and column info on
10
- parse errors. Further, when a step fails, the story file will appear in the
11
- stack trace, along with regular ruby files.
12
-
13
- == FEATURES/PROBLEMS:
14
-
15
- * Run examples with:
16
- ** ruby -Ilib bin/cucumber examples/simple --require examples/simple/steps
17
- ** ruby -Ilib bin/cucumber examples/web --require examples/web/steps
18
-
19
- * TODO: OK Refactor: Extract explicit node classes with RDoc (for better API doc)
20
- * TODO: OK Get rid of the compile method. Compile the parser in Rake.
21
- * TODO: OK Make grammar support \r\n, \r and \n (Add some fixture stories for that)
22
- * TODO: OK Make grammar support indentation
23
- * TODO: OK Make grammar be totally relaxed about narrative
24
- * TODO: OK Add a yaml file for different languages
25
- * TODO: OK Custom nodes for the syntax tree
26
- * TODO: OK Actually execute the stories
27
- * TODO: Make rake run specs by default
28
- * TODO: OK Make it work with pure ruby regexen
29
- * TODO: Make it work with string steps
30
- * TODO: bin/cucumber --require [dir|file|glob]* --language no --format [file]*
31
- * TODO: Pending steps shold print a block of code that can be pasted into code
32
- * TODO: cucumber --where "Some text from a step" that prints "__FILE__:__LINE__ (STEP PATTERN)"
33
- * TODO: Customisable trace output (like javascriptlint)
34
- * TODO: Experiment: Make $variables become @variables
35
- * TODO: GivenScenario
36
- * TODO: PureRuby
37
- * Make two trees include accept mixin
38
- * TODO: Call steps from steps
39
- * TODO: i18n in ruby too
40
- * TODO: Don't load any treetop files if no .story files are found
41
- * TODO: Summary prints execution time
42
-
43
- == SYNOPSIS:
44
-
45
- FIX (code sample of usage)
46
-
47
- == REQUIREMENTS:
48
-
49
- * gem install treetop
50
-
51
- == INSTALL:
52
-
53
- * gem install cucumber
54
-
55
- == LICENSE:
56
-
57
- (The MIT License)
58
-
59
- Copyright (c) 2008 Aslak Hellesøy
60
-
61
- Permission is hereby granted, free of charge, to any person obtaining
62
- a copy of this software and associated documentation files (the
63
- 'Software'), to deal in the Software without restriction, including
64
- without limitation the rights to use, copy, modify, merge, publish,
65
- distribute, sublicense, and/or sell copies of the Software, and to
66
- permit persons to whom the Software is furnished to do so, subject to
67
- the following conditions:
68
-
69
- The above copyright notice and this permission notice shall be
70
- included in all copies or substantial portions of the Software.
71
-
72
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
73
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
74
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
75
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
76
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
77
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
78
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,7 +0,0 @@
1
- $:.unshift(File.dirname(__FILE__) + '/../lib')
2
-
3
- require 'cucumber/rake/task'
4
-
5
- Cucumber::Rake::Task.new('simple') do |t|
6
- t.cucumber_opts = "--format pretty"
7
- end
@@ -1,16 +0,0 @@
1
- require 'cucumber/cli' # Needed in order to run the story with ruby
2
-
3
- Story "Addition", %|
4
- As a math idiot
5
- I want to be told the sum of two numbers
6
- So that I don't make silly mistakes| do
7
-
8
- Scenario "50+70" do
9
- Given "I have entered 50 into the calculator"
10
- Given "foo bar"
11
- And "I have entered 70 into the calculator"
12
- When "I add"
13
- Then "the result should be 12 on the screen"
14
- And "the result class should be Float"
15
- end
16
- end