elight-cucumber 0.1.9
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 +150 -0
- data/License.txt +20 -0
- data/Manifest.txt +186 -0
- data/README.txt +41 -0
- data/Rakefile +5 -0
- data/TODO.txt +26 -0
- data/bin/cucumber +4 -0
- data/config/hoe.rb +69 -0
- data/config/requirements.rb +15 -0
- data/cucumber.yml +1 -0
- data/examples/calculator/README.txt +5 -0
- data/examples/calculator/Rakefile +5 -0
- data/examples/calculator/features/addition.feature +17 -0
- data/examples/calculator/features/division.feature +10 -0
- data/examples/calculator/features/steps/calculator_steps.rb +31 -0
- data/examples/calculator/lib/calculator.rb +16 -0
- data/examples/calculator_ruby_features/Rakefile +6 -0
- data/examples/calculator_ruby_features/features/addition.rb +23 -0
- data/examples/calculator_ruby_features/features/steps/calculator_steps.rb +43 -0
- data/examples/calculatrice_francaise_avec_soit_scenario/Rakefile +6 -0
- data/examples/calculatrice_francaise_avec_soit_scenario/features/addition.feature +13 -0
- data/examples/calculatrice_francaise_avec_soit_scenario/features/calculatrice_steps.rb +31 -0
- data/examples/chinese_simplified_calculator/Rakefile +6 -0
- data/examples/chinese_simplified_calculator/features/addition.feature +17 -0
- data/examples/chinese_simplified_calculator/features/steps/calculator_steps.rb +24 -0
- data/examples/chinese_simplified_calculator/lib/calculator.rb +10 -0
- data/examples/cs/README.textile +22 -0
- data/examples/cs/Rakefile +12 -0
- data/examples/cs/features/hello.feature +11 -0
- data/examples/cs/features/steps/hello_steps.rb +25 -0
- data/examples/cs/features/steps/tree_steps.rb +14 -0
- data/examples/cs/features/tree.feature +9 -0
- data/examples/cs/src/Hello.cs +18 -0
- data/examples/danish_calculator/Rakefile +6 -0
- data/examples/danish_calculator/features/steps/kalkulator_steps.rb +22 -0
- data/examples/danish_calculator/features/summering.feature +17 -0
- data/examples/danish_calculator/lib/kalkulator.rb +11 -0
- data/examples/dos_line_endings/Rakefile +6 -0
- data/examples/dos_line_endings/features/dos_line_endings.feature +9 -0
- data/examples/estonian_calculator/Rakefile +6 -0
- data/examples/estonian_calculator/features/kalkulaator_steps.rb +35 -0
- data/examples/estonian_calculator/features/liitmine.feature +16 -0
- data/examples/japanese_calculator/README.txt +5 -0
- data/examples/japanese_calculator/Rakefile +6 -0
- data/examples/japanese_calculator/features/addition.feature +17 -0
- data/examples/japanese_calculator/features/division.feature +10 -0
- data/examples/japanese_calculator/features/steps/calculator_steps.rb +30 -0
- data/examples/japanese_calculator/lib/calculator.rb +16 -0
- data/examples/java/README.textile +22 -0
- data/examples/java/Rakefile +12 -0
- data/examples/java/features/hello.feature +11 -0
- data/examples/java/features/steps/hello_steps.rb +25 -0
- data/examples/java/features/steps/tree_steps.rb +14 -0
- data/examples/java/features/tree.feature +9 -0
- data/examples/java/src/cucumber/demo/Hello.java +16 -0
- data/examples/norwegian_calculator/Rakefile +6 -0
- data/examples/norwegian_calculator/features/steps/kalkulator_steps.rb +22 -0
- data/examples/norwegian_calculator/features/summering.feature +17 -0
- data/examples/norwegian_calculator/lib/kalkulator.rb +11 -0
- data/examples/portuguese_calculator/Rakefile +6 -0
- data/examples/portuguese_calculator/features/adicao.feature +10 -0
- data/examples/portuguese_calculator/features/calculadora_steps.rb +31 -0
- data/examples/selenium/Rakefile +6 -0
- data/examples/selenium/features/search.feature +9 -0
- data/examples/selenium/features/steps/stories_steps.rb +41 -0
- data/examples/spanish_calculator/Rakefile +6 -0
- data/examples/spanish_calculator/features/adicion.feature +17 -0
- data/examples/spanish_calculator/features/steps/calculador_steps.rb +22 -0
- data/examples/swedish_calculator/Rakefile +5 -0
- data/examples/swedish_calculator/features/steps/kalkulator_steps.rb +22 -0
- data/examples/swedish_calculator/features/summering.feature +17 -0
- data/examples/swedish_calculator/lib/kalkulator.rb +11 -0
- data/examples/tickets/Rakefile +11 -0
- data/examples/tickets/cucumber.yml +2 -0
- data/examples/tickets/features/steps/tickets_steps.rb +32 -0
- data/examples/tickets/features/tickets.feature +22 -0
- data/examples/watir/Rakefile +6 -0
- data/examples/watir/features/search.feature +9 -0
- data/examples/watir/features/steps/stories_steps.rb +51 -0
- data/features/see_features.feature +8 -0
- data/features/steps/features_steps.rb +9 -0
- data/gem_tasks/deployment.rake +34 -0
- data/gem_tasks/environment.rake +7 -0
- data/gem_tasks/features.rake +6 -0
- data/gem_tasks/fix_cr_lf.rake +10 -0
- data/gem_tasks/flog.rake +4 -0
- data/gem_tasks/gemspec.rake +6 -0
- data/gem_tasks/rspec.rake +21 -0
- data/gem_tasks/treetop.rake +49 -0
- data/lib/cucumber.rb +35 -0
- data/lib/cucumber/cli.rb +191 -0
- data/lib/cucumber/core_ext/proc.rb +55 -0
- data/lib/cucumber/core_ext/string.rb +22 -0
- data/lib/cucumber/executor.rb +143 -0
- data/lib/cucumber/formatters.rb +1 -0
- data/lib/cucumber/formatters/ansicolor.rb +112 -0
- data/lib/cucumber/formatters/cucumber.css +132 -0
- data/lib/cucumber/formatters/cucumber.js +11 -0
- data/lib/cucumber/formatters/html_formatter.rb +128 -0
- data/lib/cucumber/formatters/jquery.js +32 -0
- data/lib/cucumber/formatters/pretty_formatter.rb +211 -0
- data/lib/cucumber/formatters/profile_formatter.rb +92 -0
- data/lib/cucumber/formatters/progress_formatter.rb +51 -0
- data/lib/cucumber/languages.yml +142 -0
- data/lib/cucumber/model.rb +1 -0
- data/lib/cucumber/model/table.rb +28 -0
- data/lib/cucumber/rails/rspec.rb +12 -0
- data/lib/cucumber/rails/world.rb +73 -0
- data/lib/cucumber/rake/task.rb +75 -0
- data/lib/cucumber/step_methods.rb +49 -0
- data/lib/cucumber/step_mother.rb +83 -0
- data/lib/cucumber/tree.rb +18 -0
- data/lib/cucumber/tree/feature.rb +60 -0
- data/lib/cucumber/tree/features.rb +21 -0
- data/lib/cucumber/tree/given_scenario.rb +13 -0
- data/lib/cucumber/tree/scenario.rb +150 -0
- data/lib/cucumber/tree/step.rb +133 -0
- data/lib/cucumber/tree/table.rb +26 -0
- data/lib/cucumber/tree/top_down_visitor.rb +23 -0
- data/lib/cucumber/treetop_parser/feature.treetop.erb +201 -0
- data/lib/cucumber/treetop_parser/feature_da.rb +1593 -0
- data/lib/cucumber/treetop_parser/feature_de.rb +1593 -0
- data/lib/cucumber/treetop_parser/feature_en-tx.rb +1593 -0
- data/lib/cucumber/treetop_parser/feature_en.rb +1593 -0
- data/lib/cucumber/treetop_parser/feature_es.rb +1593 -0
- data/lib/cucumber/treetop_parser/feature_et.rb +1593 -0
- data/lib/cucumber/treetop_parser/feature_fr.rb +1593 -0
- data/lib/cucumber/treetop_parser/feature_ja.rb +1593 -0
- data/lib/cucumber/treetop_parser/feature_nl.rb +1593 -0
- data/lib/cucumber/treetop_parser/feature_no.rb +1593 -0
- data/lib/cucumber/treetop_parser/feature_parser.rb +34 -0
- data/lib/cucumber/treetop_parser/feature_pt.rb +1593 -0
- data/lib/cucumber/treetop_parser/feature_ru.rb +1593 -0
- data/lib/cucumber/treetop_parser/feature_se.rb +1593 -0
- data/lib/cucumber/treetop_parser/feature_zh-CN.rb +1593 -0
- data/lib/cucumber/version.rb +9 -0
- data/rails_generators/cucumber/cucumber_generator.rb +29 -0
- data/rails_generators/cucumber/templates/common_webrat.rb +42 -0
- data/rails_generators/cucumber/templates/cucumber +2 -0
- data/rails_generators/cucumber/templates/cucumber.rake +12 -0
- data/rails_generators/cucumber/templates/cucumber.yml +1 -0
- data/rails_generators/cucumber/templates/env.rb +8 -0
- data/rails_generators/feature/feature_generator.rb +17 -0
- data/rails_generators/feature/templates/feature.erb +28 -0
- data/rails_generators/feature/templates/steps.erb +22 -0
- data/script/console +10 -0
- data/script/console.cmd +1 -0
- data/script/destroy +14 -0
- data/script/destroy.cmd +1 -0
- data/script/generate +14 -0
- data/script/generate.cmd +1 -0
- data/script/txt2html +74 -0
- data/script/txt2html.cmd +1 -0
- data/setup.rb +1585 -0
- data/spec/cucumber/cli_spec.rb +56 -0
- data/spec/cucumber/core_ext/proc_spec.rb +45 -0
- data/spec/cucumber/core_ext/string_spec.rb +34 -0
- data/spec/cucumber/executor_spec.rb +130 -0
- data/spec/cucumber/formatters/ansicolor_spec.rb +35 -0
- data/spec/cucumber/formatters/features.html +269 -0
- data/spec/cucumber/formatters/html_formatter_spec.rb +74 -0
- data/spec/cucumber/formatters/pretty_formatter_spec.rb +111 -0
- data/spec/cucumber/formatters/profile_formatter_spec.rb +193 -0
- data/spec/cucumber/formatters/progress_formatter_spec.rb +45 -0
- data/spec/cucumber/model/table_spec.rb +20 -0
- data/spec/cucumber/rails/stubs/mini_rails.rb +17 -0
- data/spec/cucumber/rails/stubs/test_help.rb +1 -0
- data/spec/cucumber/rails/world_spec.rb +11 -0
- data/spec/cucumber/sell_cucumbers.feature +9 -0
- data/spec/cucumber/step_mother_spec.rb +53 -0
- data/spec/cucumber/tree/feature_spec.rb +12 -0
- data/spec/cucumber/tree/scenario_spec.rb +37 -0
- data/spec/cucumber/tree/step_spec.rb +31 -0
- data/spec/cucumber/treetop_parser/empty_feature.feature +4 -0
- data/spec/cucumber/treetop_parser/empty_scenario.feature +9 -0
- data/spec/cucumber/treetop_parser/feature_parser_spec.rb +96 -0
- data/spec/cucumber/treetop_parser/fit_scenario.feature +8 -0
- data/spec/cucumber/treetop_parser/given_scenario.feature +9 -0
- data/spec/cucumber/treetop_parser/multiline_steps.feature +13 -0
- data/spec/cucumber/treetop_parser/multiple_tables.feature +29 -0
- data/spec/cucumber/treetop_parser/spaces.feature +10 -0
- data/spec/cucumber/treetop_parser/test_dos.feature +25 -0
- data/spec/cucumber/treetop_parser/with_comments.feature +10 -0
- data/spec/spec.opts +2 -0
- data/spec/spec_helper.rb +19 -0
- metadata +288 -0
data/History.txt
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
== 0.1.9 (In Git)
|
|
2
|
+
|
|
3
|
+
Release blurb
|
|
4
|
+
|
|
5
|
+
=== New features
|
|
6
|
+
* Added support for Japanese. (Kakutani Shintaro)
|
|
7
|
+
* Added support for Texan (improvements welcome). (Aslak Hellesøy)
|
|
8
|
+
|
|
9
|
+
=== Bugfixes
|
|
10
|
+
* Don't load cucumber.yml unless it exists (Aslak Hellesøy)
|
|
11
|
+
|
|
12
|
+
=== Removed features
|
|
13
|
+
|
|
14
|
+
== 0.1.8 2008-10-18
|
|
15
|
+
|
|
16
|
+
This release extends the support for tables. PLEASE NOTE THAT TABLES ARE STILL EXPERIMENTAL.
|
|
17
|
+
In previous releases it has been possible to use tables to define "more examples" of a scenario i
|
|
18
|
+
n a FIT-style column fixture kind of way. Now you can also use tables as arguments to steps.
|
|
19
|
+
|
|
20
|
+
Tables used to define more examples after a scenario must now be prefixed. In English it looks like this:
|
|
21
|
+
|
|
22
|
+
Feature: Addition
|
|
23
|
+
In order to avoid silly mistakes
|
|
24
|
+
As a math idiot
|
|
25
|
+
I want to be told the sum of two numbers
|
|
26
|
+
|
|
27
|
+
Scenario: Add two numbers
|
|
28
|
+
Given I have entered 50 into the calculator
|
|
29
|
+
And I have entered 70 into the calculator
|
|
30
|
+
When I press add
|
|
31
|
+
Then the result should be 120 on the screen
|
|
32
|
+
And the result class should be Fixnum
|
|
33
|
+
|
|
34
|
+
More Examples:
|
|
35
|
+
| input_1 | input_2 | button | output | class |
|
|
36
|
+
| 20 | 30 | add | 50 | Fixnum |
|
|
37
|
+
| 2 | 5 | add | 7 | Fixnum |
|
|
38
|
+
| 0 | 40 | add | 40 | Fixnum |
|
|
39
|
+
|
|
40
|
+
Languages that are not updated yet will have to use "More Examples" until we get the translations.
|
|
41
|
+
|
|
42
|
+
Tables can also be used as arguments to individual steps. In fact, steps now support a single argument
|
|
43
|
+
that can span several lines. This can be a table or a string.
|
|
44
|
+
|
|
45
|
+
Example:
|
|
46
|
+
|
|
47
|
+
Given the following people exist:
|
|
48
|
+
| name | email | phone |
|
|
49
|
+
| Aslak | aslak@email.com | 123 |
|
|
50
|
+
| Joe | joe@email.com | 234 |
|
|
51
|
+
| Bryan | bryan@email.org | 456 |
|
|
52
|
+
When I search for email.com
|
|
53
|
+
Then I should see:
|
|
54
|
+
| name | email | phone |
|
|
55
|
+
| Aslak | aslak@email.com | 123 |
|
|
56
|
+
| Joe | joe@email.com | 234 |
|
|
57
|
+
And I should see:
|
|
58
|
+
"Some text
|
|
59
|
+
on several lines"
|
|
60
|
+
|
|
61
|
+
The step definitions for such multiline steps must define an extra block argument for the argument:
|
|
62
|
+
|
|
63
|
+
Given /the following people exist:/ do |people_table|
|
|
64
|
+
# people_table is of type Cucumber::Model::Table
|
|
65
|
+
# See RDoc for more info
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
Then /I should see:/ do |string|
|
|
69
|
+
# string is a plain old ruby String with leading spaces on each line removed
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
=== New features
|
|
73
|
+
* Added profile formatter. (#35, Joseph Wilk)
|
|
74
|
+
* Added support for Chinese Simplified. (Liming Lian)
|
|
75
|
+
* Added support for Dutch. (Sjoerd Tieleman)
|
|
76
|
+
* Multiline steps are now supported. (#4, Aslak Hellesøy)
|
|
77
|
+
* Tables used to define more examples for a scenario must be prefixed "More Examples" (see languages.yml for other languages)
|
|
78
|
+
* Show the file and line number for scenarios as a comment when displaying with the pretty formatter. (#40, Joseph Wilk)
|
|
79
|
+
* Show the file for the feature as a comment when displaying with the pretty formatter. (#40, Joseph Wilk)
|
|
80
|
+
* Show the feature file and line for pending steps as a comment when displaying with the pretty formatter. (#40, Joseph Wilk)
|
|
81
|
+
|
|
82
|
+
=== Bugfixes
|
|
83
|
+
* Fixed speling errors in Spanish (Daniel Cadenas)
|
|
84
|
+
* ActionMailer delivery_method should not be set to test (#41, Luke Melia)
|
|
85
|
+
* Reverse incorrectly ordered args in webrat select step (#43, David Chelimsky)
|
|
86
|
+
* Support comments above the first scenario (#31, Aslak Hellesøy)
|
|
87
|
+
* Fixed the HTML Formatter to use actual values for FIT table headers (#30, Joseph Wilk)
|
|
88
|
+
|
|
89
|
+
=== Removed features
|
|
90
|
+
* Removed the /^I go to (.*)$/ step from common_webrat.rb - it's not language agnostic and provides little value.
|
|
91
|
+
|
|
92
|
+
=== New features
|
|
93
|
+
* Added new --out option to make it easier to specify output from Rake and cucumber.yml
|
|
94
|
+
|
|
95
|
+
== 0.1.7 2008-10-05
|
|
96
|
+
|
|
97
|
+
This release fixes a few bugs and adds some new features. The most notable features are:
|
|
98
|
+
|
|
99
|
+
=== Calling steps from steps
|
|
100
|
+
|
|
101
|
+
Step definitions are a little bit closer to having regular method semantics.
|
|
102
|
+
You define them, but now you can also call them from other steps. Here is an
|
|
103
|
+
example:
|
|
104
|
+
|
|
105
|
+
Given /I am logged in as an (.*) named (.*)$/ do |role, name|
|
|
106
|
+
Given "I am registered as #{role}, #{name}, secret"
|
|
107
|
+
When "I log in with #{name}, secret"
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
Given /I am registered as (.*), (.*), (.*)/ do |role, name, password|
|
|
111
|
+
# (Code removed for brevity)
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
When /I log in with (.*), (.*)/ do |name, password|
|
|
115
|
+
# (Code removed for brevity)
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
This means that steps can be reused in other steps. The GivenScenario feature achieves a similar
|
|
119
|
+
effect (on the scenario level), but this feature is something we're not very happy with, mostly
|
|
120
|
+
because it's not parameterisable. Calling steps from steps is.
|
|
121
|
+
|
|
122
|
+
GivenScenario will still be working several releases, but the plan is to remove it completely in
|
|
123
|
+
the 0.3.0 release.
|
|
124
|
+
|
|
125
|
+
=== Seeing where a step is defined
|
|
126
|
+
|
|
127
|
+
Prior to this release it could be hard to find out where the ruby step definition matching
|
|
128
|
+
a plain text step is defined. Not anymore! Cucumber will now output this:
|
|
129
|
+
|
|
130
|
+
Scenario: Regular numbers
|
|
131
|
+
Given I have entered 3 into the calculator # features/steps/calculator_steps.rb:12
|
|
132
|
+
And I have entered 2 into the calculator # features/steps/calculator_steps.rb:12
|
|
133
|
+
When I press divide # features/steps/calculator_steps.rb:16
|
|
134
|
+
Then the result should be 1.5 on the screen # features/steps/calculator_steps.rb:20
|
|
135
|
+
And the result class should be Float # features/steps/calculator_steps.rb:24
|
|
136
|
+
|
|
137
|
+
=== Bugfixes
|
|
138
|
+
* Fixed a bug in the command line args being lost when using --profile (#27, Joseph Wilk)
|
|
139
|
+
* Fixed a bug in Webrat selects (Tim Glen)
|
|
140
|
+
* Fixed parsing of DOS line endings (#2, #28, Aslak Hellesøy)
|
|
141
|
+
|
|
142
|
+
=== New features
|
|
143
|
+
* Steps can be called from other steps (#3, Bryan Helmkamp, Aslak Hellesøy)
|
|
144
|
+
* Added But keyword to all languages (#21, Aslak Hellesøy)
|
|
145
|
+
* Added --no-source option to display step definition location next to step text (#26, Joseph Wilk, Aslak Hellesøy)
|
|
146
|
+
* Added more Webrat steps (#25, Tim Glen)
|
|
147
|
+
|
|
148
|
+
== 0.1.6 2008-10-01
|
|
149
|
+
|
|
150
|
+
First gem release!
|
data/License.txt
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Copyright (c) 2008 Aslak Hellesøy
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
4
|
+
a copy of this software and associated documentation files (the
|
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
9
|
+
the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be
|
|
12
|
+
included in all copies or substantial portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Manifest.txt
ADDED
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
History.txt
|
|
2
|
+
License.txt
|
|
3
|
+
Manifest.txt
|
|
4
|
+
README.txt
|
|
5
|
+
Rakefile
|
|
6
|
+
TODO.txt
|
|
7
|
+
bin/cucumber
|
|
8
|
+
config/hoe.rb
|
|
9
|
+
config/requirements.rb
|
|
10
|
+
cucumber.yml
|
|
11
|
+
examples/calculator/README.txt
|
|
12
|
+
examples/calculator/Rakefile
|
|
13
|
+
examples/calculator/features/addition.feature
|
|
14
|
+
examples/calculator/features/division.feature
|
|
15
|
+
examples/calculator/features/steps/calculator_steps.rb
|
|
16
|
+
examples/calculator/lib/calculator.rb
|
|
17
|
+
examples/calculator_ruby_features/Rakefile
|
|
18
|
+
examples/calculator_ruby_features/features/addition.rb
|
|
19
|
+
examples/calculator_ruby_features/features/steps/calculator_steps.rb
|
|
20
|
+
examples/calculatrice_francaise_avec_soit_scenario/Rakefile
|
|
21
|
+
examples/calculatrice_francaise_avec_soit_scenario/features/addition.feature
|
|
22
|
+
examples/calculatrice_francaise_avec_soit_scenario/features/calculatrice_steps.rb
|
|
23
|
+
examples/chinese_simplified_calculator/Rakefile
|
|
24
|
+
examples/chinese_simplified_calculator/features/addition.feature
|
|
25
|
+
examples/chinese_simplified_calculator/features/steps/calculator_steps.rb
|
|
26
|
+
examples/chinese_simplified_calculator/lib/calculator.rb
|
|
27
|
+
examples/cs/README.textile
|
|
28
|
+
examples/cs/Rakefile
|
|
29
|
+
examples/cs/features/hello.feature
|
|
30
|
+
examples/cs/features/steps/hello_steps.rb
|
|
31
|
+
examples/cs/features/steps/tree_steps.rb
|
|
32
|
+
examples/cs/features/tree.feature
|
|
33
|
+
examples/cs/src/Hello.cs
|
|
34
|
+
examples/danish_calculator/Rakefile
|
|
35
|
+
examples/danish_calculator/features/steps/kalkulator_steps.rb
|
|
36
|
+
examples/danish_calculator/features/summering.feature
|
|
37
|
+
examples/danish_calculator/lib/kalkulator.rb
|
|
38
|
+
examples/dos_line_endings/Rakefile
|
|
39
|
+
examples/dos_line_endings/features/dos_line_endings.feature
|
|
40
|
+
examples/estonian_calculator/Rakefile
|
|
41
|
+
examples/estonian_calculator/features/kalkulaator_steps.rb
|
|
42
|
+
examples/estonian_calculator/features/liitmine.feature
|
|
43
|
+
examples/japanese_calculator/README.txt
|
|
44
|
+
examples/japanese_calculator/Rakefile
|
|
45
|
+
examples/japanese_calculator/features/addition.feature
|
|
46
|
+
examples/japanese_calculator/features/division.feature
|
|
47
|
+
examples/japanese_calculator/features/steps/calculator_steps.rb
|
|
48
|
+
examples/japanese_calculator/lib/calculator.rb
|
|
49
|
+
examples/java/README.textile
|
|
50
|
+
examples/java/Rakefile
|
|
51
|
+
examples/java/features/hello.feature
|
|
52
|
+
examples/java/features/steps/hello_steps.rb
|
|
53
|
+
examples/java/features/steps/tree_steps.rb
|
|
54
|
+
examples/java/features/tree.feature
|
|
55
|
+
examples/java/src/cucumber/demo/Hello.java
|
|
56
|
+
examples/norwegian_calculator/Rakefile
|
|
57
|
+
examples/norwegian_calculator/features/steps/kalkulator_steps.rb
|
|
58
|
+
examples/norwegian_calculator/features/summering.feature
|
|
59
|
+
examples/norwegian_calculator/lib/kalkulator.rb
|
|
60
|
+
examples/portuguese_calculator/Rakefile
|
|
61
|
+
examples/portuguese_calculator/features/adicao.feature
|
|
62
|
+
examples/portuguese_calculator/features/calculadora_steps.rb
|
|
63
|
+
examples/selenium/Rakefile
|
|
64
|
+
examples/selenium/features/search.feature
|
|
65
|
+
examples/selenium/features/steps/stories_steps.rb
|
|
66
|
+
examples/spanish_calculator/Rakefile
|
|
67
|
+
examples/spanish_calculator/features/adicion.feature
|
|
68
|
+
examples/spanish_calculator/features/steps/calculador_steps.rb
|
|
69
|
+
examples/spanish_calculator/lib/Calculador.rb
|
|
70
|
+
examples/swedish_calculator/Rakefile
|
|
71
|
+
examples/swedish_calculator/features/steps/kalkulator_steps.rb
|
|
72
|
+
examples/swedish_calculator/features/summering.feature
|
|
73
|
+
examples/swedish_calculator/lib/kalkulator.rb
|
|
74
|
+
examples/tickets/Rakefile
|
|
75
|
+
examples/tickets/cucumber.yml
|
|
76
|
+
examples/tickets/features/steps/tickets_steps.rb
|
|
77
|
+
examples/tickets/features/tickets.feature
|
|
78
|
+
examples/watir/Rakefile
|
|
79
|
+
examples/watir/features/search.feature
|
|
80
|
+
examples/watir/features/steps/stories_steps.rb
|
|
81
|
+
features/see_features.feature
|
|
82
|
+
features/steps/features_steps.rb
|
|
83
|
+
gem_tasks/deployment.rake
|
|
84
|
+
gem_tasks/environment.rake
|
|
85
|
+
gem_tasks/features.rake
|
|
86
|
+
gem_tasks/fix_cr_lf.rake
|
|
87
|
+
gem_tasks/flog.rake
|
|
88
|
+
gem_tasks/gemspec.rake
|
|
89
|
+
gem_tasks/rspec.rake
|
|
90
|
+
gem_tasks/treetop.rake
|
|
91
|
+
lib/cucumber.rb
|
|
92
|
+
lib/cucumber/cli.rb
|
|
93
|
+
lib/cucumber/core_ext/proc.rb
|
|
94
|
+
lib/cucumber/core_ext/string.rb
|
|
95
|
+
lib/cucumber/executor.rb
|
|
96
|
+
lib/cucumber/formatters.rb
|
|
97
|
+
lib/cucumber/formatters/ansicolor.rb
|
|
98
|
+
lib/cucumber/formatters/cucumber.css
|
|
99
|
+
lib/cucumber/formatters/cucumber.js
|
|
100
|
+
lib/cucumber/formatters/html_formatter.rb
|
|
101
|
+
lib/cucumber/formatters/jquery.js
|
|
102
|
+
lib/cucumber/formatters/pretty_formatter.rb
|
|
103
|
+
lib/cucumber/formatters/profile_formatter.rb
|
|
104
|
+
lib/cucumber/formatters/progress_formatter.rb
|
|
105
|
+
lib/cucumber/languages.yml
|
|
106
|
+
lib/cucumber/model.rb
|
|
107
|
+
lib/cucumber/model/table.rb
|
|
108
|
+
lib/cucumber/rails/rspec.rb
|
|
109
|
+
lib/cucumber/rails/world.rb
|
|
110
|
+
lib/cucumber/rake/task.rb
|
|
111
|
+
lib/cucumber/step_methods.rb
|
|
112
|
+
lib/cucumber/step_mother.rb
|
|
113
|
+
lib/cucumber/tree.rb
|
|
114
|
+
lib/cucumber/tree/feature.rb
|
|
115
|
+
lib/cucumber/tree/features.rb
|
|
116
|
+
lib/cucumber/tree/given_scenario.rb
|
|
117
|
+
lib/cucumber/tree/scenario.rb
|
|
118
|
+
lib/cucumber/tree/step.rb
|
|
119
|
+
lib/cucumber/tree/table.rb
|
|
120
|
+
lib/cucumber/tree/top_down_visitor.rb
|
|
121
|
+
lib/cucumber/treetop_parser/feature.treetop.erb
|
|
122
|
+
lib/cucumber/treetop_parser/feature_da.rb
|
|
123
|
+
lib/cucumber/treetop_parser/feature_de.rb
|
|
124
|
+
lib/cucumber/treetop_parser/feature_en-tx.rb
|
|
125
|
+
lib/cucumber/treetop_parser/feature_en.rb
|
|
126
|
+
lib/cucumber/treetop_parser/feature_es.rb
|
|
127
|
+
lib/cucumber/treetop_parser/feature_et.rb
|
|
128
|
+
lib/cucumber/treetop_parser/feature_fr.rb
|
|
129
|
+
lib/cucumber/treetop_parser/feature_ja.rb
|
|
130
|
+
lib/cucumber/treetop_parser/feature_nl.rb
|
|
131
|
+
lib/cucumber/treetop_parser/feature_no.rb
|
|
132
|
+
lib/cucumber/treetop_parser/feature_parser.rb
|
|
133
|
+
lib/cucumber/treetop_parser/feature_pt.rb
|
|
134
|
+
lib/cucumber/treetop_parser/feature_ru.rb
|
|
135
|
+
lib/cucumber/treetop_parser/feature_se.rb
|
|
136
|
+
lib/cucumber/treetop_parser/feature_zh-CN.rb
|
|
137
|
+
lib/cucumber/version.rb
|
|
138
|
+
rails_generators/cucumber/cucumber_generator.rb
|
|
139
|
+
rails_generators/cucumber/templates/common_webrat.rb
|
|
140
|
+
rails_generators/cucumber/templates/cucumber
|
|
141
|
+
rails_generators/cucumber/templates/cucumber.rake
|
|
142
|
+
rails_generators/cucumber/templates/env.rb
|
|
143
|
+
rails_generators/cucumber/templates/cucumber.yml
|
|
144
|
+
rails_generators/feature/feature_generator.rb
|
|
145
|
+
rails_generators/feature/templates/feature.erb
|
|
146
|
+
rails_generators/feature/templates/steps.erb
|
|
147
|
+
script/console
|
|
148
|
+
script/console.cmd
|
|
149
|
+
script/destroy
|
|
150
|
+
script/destroy.cmd
|
|
151
|
+
script/generate
|
|
152
|
+
script/generate.cmd
|
|
153
|
+
script/txt2html
|
|
154
|
+
script/txt2html.cmd
|
|
155
|
+
setup.rb
|
|
156
|
+
spec/cucumber/cli_spec.rb
|
|
157
|
+
spec/cucumber/core_ext/proc_spec.rb
|
|
158
|
+
spec/cucumber/core_ext/string_spec.rb
|
|
159
|
+
spec/cucumber/executor_spec.rb
|
|
160
|
+
spec/cucumber/formatters/ansicolor_spec.rb
|
|
161
|
+
spec/cucumber/formatters/features.html
|
|
162
|
+
spec/cucumber/formatters/html_formatter_spec.rb
|
|
163
|
+
spec/cucumber/formatters/pretty_formatter_spec.rb
|
|
164
|
+
spec/cucumber/formatters/profile_formatter_spec.rb
|
|
165
|
+
spec/cucumber/formatters/progress_formatter_spec.rb
|
|
166
|
+
spec/cucumber/model/table_spec.rb
|
|
167
|
+
spec/cucumber/rails/stubs/mini_rails.rb
|
|
168
|
+
spec/cucumber/rails/stubs/test_help.rb
|
|
169
|
+
spec/cucumber/rails/world_spec.rb
|
|
170
|
+
spec/cucumber/sell_cucumbers.feature
|
|
171
|
+
spec/cucumber/step_mother_spec.rb
|
|
172
|
+
spec/cucumber/tree/feature_spec.rb
|
|
173
|
+
spec/cucumber/tree/scenario_spec.rb
|
|
174
|
+
spec/cucumber/tree/step_spec.rb
|
|
175
|
+
spec/cucumber/treetop_parser/empty_feature.feature
|
|
176
|
+
spec/cucumber/treetop_parser/empty_scenario.feature
|
|
177
|
+
spec/cucumber/treetop_parser/feature_parser_spec.rb
|
|
178
|
+
spec/cucumber/treetop_parser/fit_scenario.feature
|
|
179
|
+
spec/cucumber/treetop_parser/given_scenario.feature
|
|
180
|
+
spec/cucumber/treetop_parser/multiline_steps.feature
|
|
181
|
+
spec/cucumber/treetop_parser/multiple_tables.feature
|
|
182
|
+
spec/cucumber/treetop_parser/spaces.feature
|
|
183
|
+
spec/cucumber/treetop_parser/test_dos.feature
|
|
184
|
+
spec/cucumber/treetop_parser/with_comments.feature
|
|
185
|
+
spec/spec.opts
|
|
186
|
+
spec/spec_helper.rb
|
data/README.txt
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
= Cucumber
|
|
2
|
+
|
|
3
|
+
* http://github.com/aslakhellesoy/cucumber
|
|
4
|
+
|
|
5
|
+
== DESCRIPTION:
|
|
6
|
+
|
|
7
|
+
Cucumber executes plain text documentation of code against that code.
|
|
8
|
+
Documentation: http://github.com/aslakhellesoy/cucumber/wikis/home
|
|
9
|
+
|
|
10
|
+
== REQUIREMENTS:
|
|
11
|
+
|
|
12
|
+
* FIX (list of requirements)
|
|
13
|
+
|
|
14
|
+
== INSTALL:
|
|
15
|
+
|
|
16
|
+
* gem install cucumber
|
|
17
|
+
|
|
18
|
+
== LICENSE:
|
|
19
|
+
|
|
20
|
+
(The MIT License)
|
|
21
|
+
|
|
22
|
+
Copyright (c) 2008 Aslak Hellesøy
|
|
23
|
+
|
|
24
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
25
|
+
a copy of this software and associated documentation files (the
|
|
26
|
+
'Software'), to deal in the Software without restriction, including
|
|
27
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
28
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
29
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
30
|
+
the following conditions:
|
|
31
|
+
|
|
32
|
+
The above copyright notice and this permission notice shall be
|
|
33
|
+
included in all copies or substantial portions of the Software.
|
|
34
|
+
|
|
35
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
36
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
37
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
38
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
39
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
40
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
41
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
ADDED
data/TODO.txt
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
== FEATURES/PROBLEMS:
|
|
2
|
+
|
|
3
|
+
* TODO: OK Refactor: Extract explicit node classes with RDoc (for better API doc)
|
|
4
|
+
* TODO: OK Get rid of the compile method. Compile the parser in Rake.
|
|
5
|
+
* TODO: OK Make grammar support \r\n, \r and \n (Add some fixture features for that)
|
|
6
|
+
* TODO: OK Make grammar support indentation
|
|
7
|
+
* TODO: OK Make grammar be totally relaxed about narrative
|
|
8
|
+
* TODO: OK Add a yaml file for different languages
|
|
9
|
+
* TODO: OK Custom nodes for the syntax tree
|
|
10
|
+
* TODO: OK Actually execute the features
|
|
11
|
+
* TODO: Make rake run specs by default
|
|
12
|
+
* TODO: OK Make it work with pure ruby regexen
|
|
13
|
+
* TODO: OK Make it work with string steps
|
|
14
|
+
* TODO: bin/cucumber --require [dir|file|glob]* --language no --format [file]*
|
|
15
|
+
* TODO: OK Pending steps shold print a block of code that can be pasted into code
|
|
16
|
+
* TODO: cucumber --where "Some text from a step" that prints "__FILE__:__LINE__ (STEP PATTERN)"
|
|
17
|
+
* TODO: Customisable trace output (like javascriptlint)
|
|
18
|
+
* TODO: Experiment: Make $variables become @variables
|
|
19
|
+
* TODO: OK GivenScenario
|
|
20
|
+
* TODO: OK PureRuby
|
|
21
|
+
* Make two trees include accept mixin
|
|
22
|
+
* TODO: Call steps from steps
|
|
23
|
+
* TODO: i18n in ruby too
|
|
24
|
+
* TODO: Don't load any treetop files if no .feature files are found
|
|
25
|
+
* TODO: Summary prints execution time
|
|
26
|
+
* TODO: --nocolor option
|
data/bin/cucumber
ADDED
data/config/hoe.rb
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
require 'cucumber/version'
|
|
2
|
+
|
|
3
|
+
AUTHOR = 'Aslak Hellesøy' # can also be an array of Authors
|
|
4
|
+
EMAIL = "aslak.hellesoy@gmail.com"
|
|
5
|
+
DESCRIPTION = "Executable Feature scenarios"
|
|
6
|
+
GEM_NAME = 'cucumber' # what ppl will type to install your gem
|
|
7
|
+
HOMEPATH = "http://github.com/aslakhellesoy/cucumber"
|
|
8
|
+
RUBYFORGE_PROJECT = 'rspec'
|
|
9
|
+
|
|
10
|
+
@config_file = "~/.rubyforge/user-config.yml"
|
|
11
|
+
@config = nil
|
|
12
|
+
RUBYFORGE_USERNAME = "aslak_hellesoy"
|
|
13
|
+
def rubyforge_username
|
|
14
|
+
unless @config
|
|
15
|
+
begin
|
|
16
|
+
@config = YAML.load(File.read(File.expand_path(@config_file)))
|
|
17
|
+
rescue
|
|
18
|
+
puts <<-EOS
|
|
19
|
+
ERROR: No rubyforge config file found: #{@config_file}
|
|
20
|
+
Run 'rubyforge setup' to prepare your env for access to Rubyforge
|
|
21
|
+
- See http://newgem.rubyforge.org/rubyforge.html for more details
|
|
22
|
+
EOS
|
|
23
|
+
exit
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
RUBYFORGE_USERNAME.replace @config["username"]
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
REV = nil
|
|
31
|
+
# UNCOMMENT IF REQUIRED:
|
|
32
|
+
# REV = YAML.load(`svn info`)['Revision']
|
|
33
|
+
VERS = Cucumber::VERSION::STRING + (REV ? ".#{REV}" : "")
|
|
34
|
+
RDOC_OPTS = ['--quiet', '--title', 'Cucumber documentation',
|
|
35
|
+
"--opname", "index.html",
|
|
36
|
+
"--line-numbers",
|
|
37
|
+
"--main", "README.textile",
|
|
38
|
+
"--inline-source"]
|
|
39
|
+
|
|
40
|
+
class Hoe
|
|
41
|
+
def extra_deps
|
|
42
|
+
@extra_deps.reject! { |x| Array(x).first == 'hoe' }
|
|
43
|
+
@extra_deps
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Generate all the Rake tasks
|
|
48
|
+
# Run 'rake -T' to see list of generated tasks (from gem root directory)
|
|
49
|
+
$hoe = Hoe.new(GEM_NAME, VERS) do |p|
|
|
50
|
+
p.developer(AUTHOR, EMAIL)
|
|
51
|
+
p.description = DESCRIPTION
|
|
52
|
+
p.summary = DESCRIPTION
|
|
53
|
+
p.url = HOMEPATH
|
|
54
|
+
p.rubyforge_name = RUBYFORGE_PROJECT if RUBYFORGE_PROJECT
|
|
55
|
+
p.clean_globs |= ['**/.*.sw?', '*.gem', '.config', '**/.DS_Store', '**/*.class', '**/*.jar'] #An array of file patterns to delete on clean.
|
|
56
|
+
|
|
57
|
+
# == Optional
|
|
58
|
+
p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
|
|
59
|
+
#p.extra_deps = [] # An array of rubygem dependencies [name, version], e.g. [ ['active_support', '>= 1.3.1'] ]
|
|
60
|
+
p.extra_deps = [ ['term-ansicolor', '>= 1.0.3'], ['treetop', '>= 1.2.4'], ['rspec', '>= 1.1.5'], ['diff-lcs', '>= 1.1.2'] ]
|
|
61
|
+
|
|
62
|
+
#p.spec_extras = {} # A hash of extra values to set in the gemspec.
|
|
63
|
+
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
CHANGES = $hoe.paragraphs_of('History.txt', 0..1).join("\\n\\n")
|
|
67
|
+
PATH = (RUBYFORGE_PROJECT == GEM_NAME) ? RUBYFORGE_PROJECT : "#{RUBYFORGE_PROJECT}/#{GEM_NAME}"
|
|
68
|
+
$hoe.remote_rdoc_dir = File.join(PATH.gsub(/^#{RUBYFORGE_PROJECT}\/?/,''), 'rdoc')
|
|
69
|
+
$hoe.rsync_args = '-av --delete --ignore-errors'
|