cucumber 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +86 -3
- data/Manifest.txt +93 -44
- data/Rakefile +5 -1
- data/bin/cucumber +1 -0
- data/cucumber.yml +1 -1
- data/examples/calculator_ruby_features/features/{steps → step_definitons}/calculator_steps.rb +0 -0
- data/examples/cs/features/{steps → step_definitons}/hello_steps.rb +0 -0
- data/examples/cs/features/{steps → step_definitons}/tree_steps.rb +0 -0
- data/examples/i18n/README.textile +18 -0
- data/examples/i18n/Rakefile +16 -0
- data/examples/i18n/ar/Rakefile +6 -0
- data/examples/i18n/ar/features/addition.feature +17 -0
- data/examples/i18n/ar/features/step_definitons/calculator_steps.rb +31 -0
- data/examples/i18n/ar/lib/calculator.rb +10 -0
- data/examples/i18n/da/Rakefile +6 -0
- data/examples/{danish_calculator/features/steps → i18n/da/features/step_definitons}/kalkulator_steps.rb +0 -0
- data/examples/{danish_calculator → i18n/da}/features/summering.feature +1 -1
- data/examples/{danish_calculator → i18n/da}/lib/kalkulator.rb +0 -0
- data/examples/{swedish_calculator → i18n/en}/Rakefile +1 -1
- data/examples/{calculator → i18n/en}/features/addition.feature +0 -0
- data/examples/{calculator → i18n/en}/features/division.feature +0 -0
- data/examples/{calculator/features/steps → i18n/en/features/step_definitons}/calculator_steps.rb +0 -0
- data/examples/{calculator → i18n/en}/lib/calculator.rb +0 -2
- data/examples/i18n/es/Rakefile +6 -0
- data/examples/{spanish_calculator → i18n/es}/features/adicion.feature +1 -1
- data/examples/{spanish_calculator/features/steps → i18n/es/features/step_definitons}/calculador_steps.rb +0 -0
- data/examples/{spanish_calculator/lib/Calculador.rb → i18n/es/lib/calculador.rb} +0 -0
- data/examples/i18n/et/Rakefile +6 -0
- data/examples/i18n/et/features/liitmine.feature +17 -0
- data/examples/{estonian_calculator/features → i18n/et/features/step_definitions}/kalkulaator_steps.rb +2 -11
- data/examples/i18n/et/lib/kalkulaator.rb +10 -0
- data/examples/i18n/fr/Rakefile +6 -0
- data/examples/{calculatrice_francaise_avec_soit_scenario → i18n/fr}/features/addition.feature +0 -0
- data/examples/{calculatrice_francaise_avec_soit_scenario/features → i18n/fr/features/step_definitions}/calculatrice_steps.rb +2 -11
- data/examples/i18n/fr/lib/calculatrice.rb +10 -0
- data/examples/i18n/id/Rakefile +6 -0
- data/examples/i18n/id/features/addition.feature +17 -0
- data/examples/i18n/id/features/division.feature +10 -0
- data/examples/i18n/id/features/step_definitons/calculator_steps.rb +31 -0
- data/examples/i18n/id/lib/calculator.rb +14 -0
- data/examples/i18n/it/Rakefile +6 -0
- data/examples/i18n/it/features/somma.feature +10 -0
- data/examples/i18n/it/features/step_definitons/calcolatrice_steps.rb +22 -0
- data/examples/i18n/it/lib/calcolatrice.rb +11 -0
- data/examples/{calculator → i18n/ja}/README.txt +0 -0
- data/examples/i18n/ja/Rakefile +6 -0
- data/examples/i18n/ja/features/addition.feature +17 -0
- data/examples/i18n/ja/features/division.feature +10 -0
- data/examples/i18n/ja/features/step_definitons/calculator_steps.rb +30 -0
- data/examples/i18n/ja/lib/calculator.rb +14 -0
- data/examples/i18n/no/Rakefile +6 -0
- data/examples/{norwegian_calculator/features/steps → i18n/no/features/step_definitons}/kalkulator_steps.rb +0 -0
- data/examples/{norwegian_calculator → i18n/no}/features/summering.feature +0 -0
- data/examples/{norwegian_calculator → i18n/no}/lib/kalkulator.rb +0 -0
- data/examples/i18n/pt/Rakefile +6 -0
- data/examples/{portuguese_calculator → i18n/pt}/features/adicao.feature +0 -0
- data/examples/{portuguese_calculator/features → i18n/pt/features/step_definitions}/calculadora_steps.rb +2 -11
- data/examples/i18n/pt/lib/calculadora.rb +10 -0
- data/examples/i18n/ro/Rakefile +6 -0
- data/examples/i18n/ro/features/step_definitons/calculator_steps.rb +22 -0
- data/examples/i18n/ro/features/suma.feature +10 -0
- data/examples/i18n/ro/lib/calculator.rb +11 -0
- data/examples/i18n/se/Rakefile +6 -0
- data/examples/{swedish_calculator/features/steps → i18n/se/features/step_definitons}/kalkulator_steps.rb +0 -0
- data/examples/{swedish_calculator → i18n/se}/features/summering.feature +0 -0
- data/examples/{swedish_calculator → i18n/se}/lib/kalkulator.rb +0 -0
- data/examples/i18n/zh-CN/Rakefile +6 -0
- data/examples/{chinese_simplified_calculator → i18n/zh-CN}/features/addition.feature +0 -0
- data/examples/{chinese_simplified_calculator/features/steps → i18n/zh-CN/features/step_definitons}/calculator_steps.rb +0 -0
- data/examples/{chinese_simplified_calculator → i18n/zh-CN}/lib/calculator.rb +0 -0
- data/examples/java/features/{steps → step_definitons}/hello_steps.rb +0 -0
- data/examples/java/features/{steps → step_definitons}/tree_steps.rb +0 -0
- data/examples/selenium/features/{steps → step_definitons}/stories_steps.rb +0 -0
- data/examples/tickets/features/{steps → step_definitons}/tickets_steps.rb +0 -0
- data/examples/watir/features/search.feature +2 -2
- data/examples/watir/features/{steps → step_definitons}/stories_steps.rb +0 -0
- data/gem_tasks/treetop.rake +1 -9
- data/lib/autotest/cucumber.rb +6 -0
- data/lib/autotest/cucumber_mixin.rb +109 -0
- data/lib/autotest/cucumber_rails.rb +6 -0
- data/lib/autotest/cucumber_rails_rspec.rb +6 -0
- data/lib/autotest/cucumber_rspec.rb +6 -0
- data/lib/autotest/discover.rb +9 -0
- data/lib/cucumber.rb +4 -0
- data/lib/cucumber/broadcaster.rb +20 -0
- data/lib/cucumber/cli.rb +139 -48
- data/lib/cucumber/core_ext/proc.rb +2 -3
- data/lib/cucumber/executor.rb +59 -32
- data/lib/cucumber/formatters.rb +1 -1
- data/lib/cucumber/formatters/ansicolor.rb +3 -4
- data/lib/cucumber/formatters/autotest_formatter.rb +23 -0
- data/lib/cucumber/formatters/pretty_formatter.rb +99 -42
- data/lib/cucumber/formatters/progress_formatter.rb +21 -5
- data/lib/cucumber/languages.yml +125 -10
- data/lib/cucumber/rails/world.rb +1 -1
- data/lib/cucumber/rake/task.rb +52 -26
- data/lib/cucumber/step_mother.rb +7 -1
- data/lib/cucumber/tree/feature.rb +8 -6
- data/lib/cucumber/tree/scenario.rb +34 -15
- data/lib/cucumber/tree/step.rb +3 -1
- data/lib/cucumber/treetop_parser/feature.treetop.erb +15 -10
- data/lib/cucumber/treetop_parser/feature_ar.rb +1591 -0
- data/lib/cucumber/treetop_parser/feature_cy.rb +1591 -0
- data/lib/cucumber/treetop_parser/feature_da.rb +238 -240
- data/lib/cucumber/treetop_parser/feature_de.rb +238 -240
- data/lib/cucumber/treetop_parser/feature_en-tx.rb +1591 -0
- data/lib/cucumber/treetop_parser/feature_en.rb +238 -240
- data/lib/cucumber/treetop_parser/feature_es.rb +238 -240
- data/lib/cucumber/treetop_parser/feature_et.rb +238 -240
- data/lib/cucumber/treetop_parser/feature_fr.rb +238 -240
- data/lib/cucumber/treetop_parser/feature_id.rb +1591 -0
- data/lib/cucumber/treetop_parser/feature_it.rb +1591 -0
- data/lib/cucumber/treetop_parser/feature_ja.rb +1591 -0
- data/lib/cucumber/treetop_parser/feature_nl.rb +238 -240
- data/lib/cucumber/treetop_parser/feature_no.rb +238 -240
- data/lib/cucumber/treetop_parser/feature_pl.rb +1591 -0
- data/lib/cucumber/treetop_parser/feature_pt.rb +238 -240
- data/lib/cucumber/treetop_parser/feature_ro.rb +1591 -0
- data/lib/cucumber/treetop_parser/feature_ro2.rb +1591 -0
- data/lib/cucumber/treetop_parser/feature_ru.rb +238 -240
- data/lib/cucumber/treetop_parser/feature_se.rb +238 -240
- data/lib/cucumber/treetop_parser/feature_zh-CN.rb +238 -240
- data/lib/cucumber/version.rb +1 -1
- data/rails_generators/cucumber/USAGE +11 -0
- data/rails_generators/cucumber/cucumber_generator.rb +9 -6
- data/rails_generators/cucumber/templates/cucumber +6 -1
- data/rails_generators/cucumber/templates/{common_webrat.rb → webrat_steps.rb} +4 -0
- data/rails_generators/feature/USAGE +12 -0
- data/rails_generators/feature/feature_generator.rb +3 -4
- data/spec/cucumber/broadcaster_spec.rb +27 -0
- data/spec/cucumber/cli_spec.rb +211 -23
- data/spec/cucumber/executor_spec.rb +104 -14
- data/spec/cucumber/formatters/ansicolor_spec.rb +9 -1
- data/spec/cucumber/formatters/autotest_formatter_spec.rb +26 -0
- data/spec/cucumber/formatters/pretty_formatter_spec.rb +119 -26
- data/spec/cucumber/formatters/profile_formatter_spec.rb +1 -2
- data/spec/cucumber/formatters/progress_formatter_spec.rb +22 -1
- data/spec/cucumber/sell_cucumbers.feature +10 -0
- data/spec/cucumber/step_mother_spec.rb +21 -0
- data/spec/cucumber/tree/row_scenario_spec.rb +25 -0
- data/spec/cucumber/tree/scenario_spec.rb +47 -8
- data/spec/cucumber/tree/step_spec.rb +19 -0
- data/spec/cucumber/treetop_parser/feature_parser_spec.rb +2 -0
- data/spec/cucumber/treetop_parser/multiline_steps.feature +7 -3
- data/spec/spec_helper.rb +2 -0
- metadata +97 -48
- data/examples/calculator/Rakefile +0 -5
- data/examples/calculatrice_francaise_avec_soit_scenario/Rakefile +0 -6
- data/examples/chinese_simplified_calculator/Rakefile +0 -6
- data/examples/danish_calculator/Rakefile +0 -6
- data/examples/estonian_calculator/Rakefile +0 -6
- data/examples/estonian_calculator/features/liitmine.feature +0 -16
- data/examples/norwegian_calculator/Rakefile +0 -6
- data/examples/portuguese_calculator/Rakefile +0 -6
- data/examples/spanish_calculator/Rakefile +0 -6
data/History.txt
CHANGED
@@ -1,3 +1,86 @@
|
|
1
|
+
== 0.1.9
|
2
|
+
|
3
|
+
With this release Cucumber supports 19 (!) natural languages:
|
4
|
+
|
5
|
+
* Arabic
|
6
|
+
* Chinese Simplified
|
7
|
+
* Danish
|
8
|
+
* Dutch
|
9
|
+
* Estonian
|
10
|
+
* French
|
11
|
+
* German
|
12
|
+
* Italian
|
13
|
+
* Japanese
|
14
|
+
* Malay
|
15
|
+
* Norwegian
|
16
|
+
* Polish
|
17
|
+
* Portuguese
|
18
|
+
* Romanian
|
19
|
+
* Russian
|
20
|
+
* Spanish
|
21
|
+
* Swedish
|
22
|
+
* Texan
|
23
|
+
* Welsh
|
24
|
+
|
25
|
+
Thanks a lot to everyone who has contributed translations. If you don't see your language here, please
|
26
|
+
add it: http://github.com/aslakhellesoy/cucumber/wikis/spoken-languages
|
27
|
+
|
28
|
+
Main functional changes in this release is "Autotest":http://github.com/aslakhellesoy/cucumber/wikis/autotest-integration
|
29
|
+
support and how multiline strings work in feature files:
|
30
|
+
|
31
|
+
# In your .feature file
|
32
|
+
Then I should see
|
33
|
+
"""
|
34
|
+
A string
|
35
|
+
that "indents"
|
36
|
+
and spans
|
37
|
+
several lines
|
38
|
+
|
39
|
+
"""
|
40
|
+
|
41
|
+
# In your steps.rb file
|
42
|
+
Then 'I should see' do |text|
|
43
|
+
text.should == "A string\n that \"indents\"\nand spans\nseveral lines\n"
|
44
|
+
end
|
45
|
+
|
46
|
+
The triple quotes are used to define the start and end of a string, and it also defines what gets stripped away
|
47
|
+
in the inside string. If the triple quotes are indented 4 spaces, then the text within will have the 4 first
|
48
|
+
spaces removed too.
|
49
|
+
|
50
|
+
=== New features
|
51
|
+
* Added --[no-]color option to force color on or off (Peter Jaros)
|
52
|
+
* Step definition without a block will be treated as pending (#64 Joseph Wilk)
|
53
|
+
* Added support for Welsh (improvements welcome) (Joseph Wilk)
|
54
|
+
* Added --quiet option to hide all development aid output when using Pretty formatter (#69 Joseph Wilk)
|
55
|
+
* Added --no-snippets option to hide snippets for pending steps when using Pretty formatter (#69 Joseph Wilk)
|
56
|
+
* Added error messages concerning cucumber.yml. (#70 Ben Mabey)
|
57
|
+
* Added Autotest support - work in progress... (Peter Jaros)
|
58
|
+
* Added new --exclude option (Bryan Helkamp)
|
59
|
+
* Added new --scenario option (Peter Jaros)
|
60
|
+
* Renamed common_webrat.rb to webrat_steps.rb (Ben Mabey, Aslak Hellesøy)
|
61
|
+
* Added new feature[:feature_path] task (Roman Gonzalez)
|
62
|
+
* Added support for Polish (Joseph Wilk)
|
63
|
+
* Support specifying multiple formatters and multiple outputs (#47 Joseph Wilk)
|
64
|
+
* Added support for Japanese. (Kakutani Shintaro)
|
65
|
+
* Added support for Texan (improvements welcome). (Aslak Hellesøy)
|
66
|
+
|
67
|
+
=== Bugfixes
|
68
|
+
* Pending step snippets should escape special Regexp characters (#82 Joseph Wilk)
|
69
|
+
* Scenario without a body shouldn't show up as complete (#63 Josh Knowles)
|
70
|
+
* Fixed bug where utf-8 strings where breaking comment alighments. (#79 Joseph Wilk)
|
71
|
+
* Fixed next_column_index not resetting after large tables (#60, Barry Mitchelson)
|
72
|
+
* The HTML formatter was rendering everything twice. Cannot invoke visit_feature on formatters in executor (#72 Joseph Wilk)
|
73
|
+
* Row Scenarios need to support pending? in order for the Profile formatter to work (Joseph Wilk)
|
74
|
+
* Snippets are not shown for steps which already have a step definition (#65 Joseph Wilk)
|
75
|
+
* Prevent feature/scenario/pending step comments from containing '//' when running features by specifying a directory with a trailing '/' (Joseph Wilk)
|
76
|
+
* Scenario tables need spacing after them (#59 Joseph Wilk)
|
77
|
+
* Support running scenario table rows when using --line argument (#55 Joseph Wilk)
|
78
|
+
* Don't load cucumber.yml unless it exists (Aslak Hellesøy)
|
79
|
+
* Fixing bug where specifying line number 1 in a feature which starts with a scenario with a scenario table was raising an error (#56 Joseph Wilk)
|
80
|
+
|
81
|
+
=== Removed features
|
82
|
+
|
83
|
+
|
1
84
|
== 0.1.8 2008-10-18
|
2
85
|
|
3
86
|
This release extends the support for tables. PLEASE NOTE THAT TABLES ARE STILL EXPERIMENTAL.
|
@@ -35,7 +118,7 @@ Example:
|
|
35
118
|
| name | email | phone |
|
36
119
|
| Aslak | aslak@email.com | 123 |
|
37
120
|
| Joe | joe@email.com | 234 |
|
38
|
-
| Bryan | bryan@email.org |
|
121
|
+
| Bryan | bryan@email.org | 456 |
|
39
122
|
When I search for email.com
|
40
123
|
Then I should see:
|
41
124
|
| name | email | phone |
|
@@ -79,7 +162,7 @@ The step definitions for such multiline steps must define an extra block argumen
|
|
79
162
|
=== New features
|
80
163
|
* Added new --out option to make it easier to specify output from Rake and cucumber.yml
|
81
164
|
|
82
|
-
== 0.1.7
|
165
|
+
== 0.1.7 2008-10-05
|
83
166
|
|
84
167
|
This release fixes a few bugs and adds some new features. The most notable features are:
|
85
168
|
|
@@ -132,6 +215,6 @@ a plain text step is defined. Not anymore! Cucumber will now output this:
|
|
132
215
|
* Added --no-source option to display step definition location next to step text (#26, Joseph Wilk, Aslak Hellesøy)
|
133
216
|
* Added more Webrat steps (#25, Tim Glen)
|
134
217
|
|
135
|
-
== 0.1.6
|
218
|
+
== 0.1.6 2008-10-01
|
136
219
|
|
137
220
|
First gem release!
|
data/Manifest.txt
CHANGED
@@ -8,70 +8,97 @@ bin/cucumber
|
|
8
8
|
config/hoe.rb
|
9
9
|
config/requirements.rb
|
10
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
11
|
examples/calculator_ruby_features/Rakefile
|
18
12
|
examples/calculator_ruby_features/features/addition.rb
|
19
|
-
examples/calculator_ruby_features/features/
|
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
|
13
|
+
examples/calculator_ruby_features/features/step_definitons/calculator_steps.rb
|
27
14
|
examples/cs/README.textile
|
28
15
|
examples/cs/Rakefile
|
29
16
|
examples/cs/features/hello.feature
|
30
|
-
examples/cs/features/
|
31
|
-
examples/cs/features/
|
17
|
+
examples/cs/features/step_definitons/hello_steps.rb
|
18
|
+
examples/cs/features/step_definitons/tree_steps.rb
|
32
19
|
examples/cs/features/tree.feature
|
33
20
|
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
21
|
examples/dos_line_endings/Rakefile
|
39
22
|
examples/dos_line_endings/features/dos_line_endings.feature
|
40
|
-
examples/
|
41
|
-
examples/
|
42
|
-
examples/
|
23
|
+
examples/i18n/README.textile
|
24
|
+
examples/i18n/Rakefile
|
25
|
+
examples/i18n/ar/Rakefile
|
26
|
+
examples/i18n/ar/features/addition.feature
|
27
|
+
examples/i18n/ar/features/step_definitons/calculator_steps.rb
|
28
|
+
examples/i18n/ar/lib/calculator.rb
|
29
|
+
examples/i18n/da/Rakefile
|
30
|
+
examples/i18n/da/features/step_definitons/kalkulator_steps.rb
|
31
|
+
examples/i18n/da/features/summering.feature
|
32
|
+
examples/i18n/da/lib/kalkulator.rb
|
33
|
+
examples/i18n/en/Rakefile
|
34
|
+
examples/i18n/en/features/addition.feature
|
35
|
+
examples/i18n/en/features/division.feature
|
36
|
+
examples/i18n/en/features/step_definitons/calculator_steps.rb
|
37
|
+
examples/i18n/en/lib/calculator.rb
|
38
|
+
examples/i18n/es/Rakefile
|
39
|
+
examples/i18n/es/features/adicion.feature
|
40
|
+
examples/i18n/es/features/step_definitons/calculador_steps.rb
|
41
|
+
examples/i18n/es/lib/calculador.rb
|
42
|
+
examples/i18n/et/Rakefile
|
43
|
+
examples/i18n/et/features/liitmine.feature
|
44
|
+
examples/i18n/et/features/step_definitions/kalkulaator_steps.rb
|
45
|
+
examples/i18n/et/lib/kalkulaator.rb
|
46
|
+
examples/i18n/fr/Rakefile
|
47
|
+
examples/i18n/fr/features/addition.feature
|
48
|
+
examples/i18n/fr/features/step_definitions/calculatrice_steps.rb
|
49
|
+
examples/i18n/fr/lib/calculatrice.rb
|
50
|
+
examples/i18n/id/Rakefile
|
51
|
+
examples/i18n/id/features/addition.feature
|
52
|
+
examples/i18n/id/features/division.feature
|
53
|
+
examples/i18n/id/features/step_definitons/calculator_steps.rb
|
54
|
+
examples/i18n/id/lib/calculator.rb
|
55
|
+
examples/i18n/it/Rakefile
|
56
|
+
examples/i18n/it/features/somma.feature
|
57
|
+
examples/i18n/it/features/step_definitons/calcolatrice_steps.rb
|
58
|
+
examples/i18n/it/lib/calcolatrice.rb
|
59
|
+
examples/i18n/ja/README.txt
|
60
|
+
examples/i18n/ja/Rakefile
|
61
|
+
examples/i18n/ja/features/addition.feature
|
62
|
+
examples/i18n/ja/features/division.feature
|
63
|
+
examples/i18n/ja/features/step_definitons/calculator_steps.rb
|
64
|
+
examples/i18n/ja/lib/calculator.rb
|
65
|
+
examples/i18n/no/Rakefile
|
66
|
+
examples/i18n/no/features/step_definitons/kalkulator_steps.rb
|
67
|
+
examples/i18n/no/features/summering.feature
|
68
|
+
examples/i18n/no/lib/kalkulator.rb
|
69
|
+
examples/i18n/pt/Rakefile
|
70
|
+
examples/i18n/pt/features/adicao.feature
|
71
|
+
examples/i18n/pt/features/step_definitions/calculadora_steps.rb
|
72
|
+
examples/i18n/pt/lib/calculadora.rb
|
73
|
+
examples/i18n/ro/Rakefile
|
74
|
+
examples/i18n/ro/features/step_definitons/calculator_steps.rb
|
75
|
+
examples/i18n/ro/features/suma.feature
|
76
|
+
examples/i18n/ro/lib/calculator.rb
|
77
|
+
examples/i18n/se/Rakefile
|
78
|
+
examples/i18n/se/features/step_definitons/kalkulator_steps.rb
|
79
|
+
examples/i18n/se/features/summering.feature
|
80
|
+
examples/i18n/se/lib/kalkulator.rb
|
81
|
+
examples/i18n/zh-CN/Rakefile
|
82
|
+
examples/i18n/zh-CN/features/addition.feature
|
83
|
+
examples/i18n/zh-CN/features/step_definitons/calculator_steps.rb
|
84
|
+
examples/i18n/zh-CN/lib/calculator.rb
|
43
85
|
examples/java/README.textile
|
44
86
|
examples/java/Rakefile
|
45
87
|
examples/java/features/hello.feature
|
46
|
-
examples/java/features/
|
47
|
-
examples/java/features/
|
88
|
+
examples/java/features/step_definitons/hello_steps.rb
|
89
|
+
examples/java/features/step_definitons/tree_steps.rb
|
48
90
|
examples/java/features/tree.feature
|
49
91
|
examples/java/src/cucumber/demo/Hello.java
|
50
|
-
examples/norwegian_calculator/Rakefile
|
51
|
-
examples/norwegian_calculator/features/steps/kalkulator_steps.rb
|
52
|
-
examples/norwegian_calculator/features/summering.feature
|
53
|
-
examples/norwegian_calculator/lib/kalkulator.rb
|
54
|
-
examples/portuguese_calculator/Rakefile
|
55
|
-
examples/portuguese_calculator/features/adicao.feature
|
56
|
-
examples/portuguese_calculator/features/calculadora_steps.rb
|
57
92
|
examples/selenium/Rakefile
|
58
93
|
examples/selenium/features/search.feature
|
59
|
-
examples/selenium/features/
|
60
|
-
examples/spanish_calculator/Rakefile
|
61
|
-
examples/spanish_calculator/features/adicion.feature
|
62
|
-
examples/spanish_calculator/features/steps/calculador_steps.rb
|
63
|
-
examples/spanish_calculator/lib/Calculador.rb
|
64
|
-
examples/swedish_calculator/Rakefile
|
65
|
-
examples/swedish_calculator/features/steps/kalkulator_steps.rb
|
66
|
-
examples/swedish_calculator/features/summering.feature
|
67
|
-
examples/swedish_calculator/lib/kalkulator.rb
|
94
|
+
examples/selenium/features/step_definitons/stories_steps.rb
|
68
95
|
examples/tickets/Rakefile
|
69
96
|
examples/tickets/cucumber.yml
|
70
|
-
examples/tickets/features/
|
97
|
+
examples/tickets/features/step_definitons/tickets_steps.rb
|
71
98
|
examples/tickets/features/tickets.feature
|
72
99
|
examples/watir/Rakefile
|
73
100
|
examples/watir/features/search.feature
|
74
|
-
examples/watir/features/
|
101
|
+
examples/watir/features/step_definitons/stories_steps.rb
|
75
102
|
features/see_features.feature
|
76
103
|
features/steps/features_steps.rb
|
77
104
|
gem_tasks/deployment.rake
|
@@ -82,13 +109,21 @@ gem_tasks/flog.rake
|
|
82
109
|
gem_tasks/gemspec.rake
|
83
110
|
gem_tasks/rspec.rake
|
84
111
|
gem_tasks/treetop.rake
|
112
|
+
lib/autotest/cucumber.rb
|
113
|
+
lib/autotest/cucumber_mixin.rb
|
114
|
+
lib/autotest/cucumber_rails.rb
|
115
|
+
lib/autotest/cucumber_rails_rspec.rb
|
116
|
+
lib/autotest/cucumber_rspec.rb
|
117
|
+
lib/autotest/discover.rb
|
85
118
|
lib/cucumber.rb
|
119
|
+
lib/cucumber/broadcaster.rb
|
86
120
|
lib/cucumber/cli.rb
|
87
121
|
lib/cucumber/core_ext/proc.rb
|
88
122
|
lib/cucumber/core_ext/string.rb
|
89
123
|
lib/cucumber/executor.rb
|
90
124
|
lib/cucumber/formatters.rb
|
91
125
|
lib/cucumber/formatters/ansicolor.rb
|
126
|
+
lib/cucumber/formatters/autotest_formatter.rb
|
92
127
|
lib/cucumber/formatters/cucumber.css
|
93
128
|
lib/cucumber/formatters/cucumber.js
|
94
129
|
lib/cucumber/formatters/html_formatter.rb
|
@@ -113,25 +148,36 @@ lib/cucumber/tree/step.rb
|
|
113
148
|
lib/cucumber/tree/table.rb
|
114
149
|
lib/cucumber/tree/top_down_visitor.rb
|
115
150
|
lib/cucumber/treetop_parser/feature.treetop.erb
|
151
|
+
lib/cucumber/treetop_parser/feature_ar.rb
|
152
|
+
lib/cucumber/treetop_parser/feature_cy.rb
|
116
153
|
lib/cucumber/treetop_parser/feature_da.rb
|
117
154
|
lib/cucumber/treetop_parser/feature_de.rb
|
155
|
+
lib/cucumber/treetop_parser/feature_en-tx.rb
|
118
156
|
lib/cucumber/treetop_parser/feature_en.rb
|
119
157
|
lib/cucumber/treetop_parser/feature_es.rb
|
120
158
|
lib/cucumber/treetop_parser/feature_et.rb
|
121
159
|
lib/cucumber/treetop_parser/feature_fr.rb
|
160
|
+
lib/cucumber/treetop_parser/feature_id.rb
|
161
|
+
lib/cucumber/treetop_parser/feature_it.rb
|
162
|
+
lib/cucumber/treetop_parser/feature_ja.rb
|
122
163
|
lib/cucumber/treetop_parser/feature_nl.rb
|
123
164
|
lib/cucumber/treetop_parser/feature_no.rb
|
124
165
|
lib/cucumber/treetop_parser/feature_parser.rb
|
166
|
+
lib/cucumber/treetop_parser/feature_pl.rb
|
125
167
|
lib/cucumber/treetop_parser/feature_pt.rb
|
168
|
+
lib/cucumber/treetop_parser/feature_ro.rb
|
169
|
+
lib/cucumber/treetop_parser/feature_ro2.rb
|
126
170
|
lib/cucumber/treetop_parser/feature_ru.rb
|
127
171
|
lib/cucumber/treetop_parser/feature_se.rb
|
128
172
|
lib/cucumber/treetop_parser/feature_zh-CN.rb
|
129
173
|
lib/cucumber/version.rb
|
174
|
+
rails_generators/cucumber/USAGE
|
130
175
|
rails_generators/cucumber/cucumber_generator.rb
|
131
|
-
rails_generators/cucumber/templates/common_webrat.rb
|
132
176
|
rails_generators/cucumber/templates/cucumber
|
133
177
|
rails_generators/cucumber/templates/cucumber.rake
|
134
178
|
rails_generators/cucumber/templates/env.rb
|
179
|
+
rails_generators/cucumber/templates/webrat_steps.rb
|
180
|
+
rails_generators/feature/USAGE
|
135
181
|
rails_generators/feature/feature_generator.rb
|
136
182
|
rails_generators/feature/templates/feature.erb
|
137
183
|
rails_generators/feature/templates/steps.erb
|
@@ -144,11 +190,13 @@ script/generate.cmd
|
|
144
190
|
script/txt2html
|
145
191
|
script/txt2html.cmd
|
146
192
|
setup.rb
|
193
|
+
spec/cucumber/broadcaster_spec.rb
|
147
194
|
spec/cucumber/cli_spec.rb
|
148
195
|
spec/cucumber/core_ext/proc_spec.rb
|
149
196
|
spec/cucumber/core_ext/string_spec.rb
|
150
197
|
spec/cucumber/executor_spec.rb
|
151
198
|
spec/cucumber/formatters/ansicolor_spec.rb
|
199
|
+
spec/cucumber/formatters/autotest_formatter_spec.rb
|
152
200
|
spec/cucumber/formatters/features.html
|
153
201
|
spec/cucumber/formatters/html_formatter_spec.rb
|
154
202
|
spec/cucumber/formatters/pretty_formatter_spec.rb
|
@@ -161,6 +209,7 @@ spec/cucumber/rails/world_spec.rb
|
|
161
209
|
spec/cucumber/sell_cucumbers.feature
|
162
210
|
spec/cucumber/step_mother_spec.rb
|
163
211
|
spec/cucumber/tree/feature_spec.rb
|
212
|
+
spec/cucumber/tree/row_scenario_spec.rb
|
164
213
|
spec/cucumber/tree/scenario_spec.rb
|
165
214
|
spec/cucumber/tree/step_spec.rb
|
166
215
|
spec/cucumber/treetop_parser/empty_feature.feature
|
data/Rakefile
CHANGED
@@ -2,4 +2,8 @@ ENV['NODOT'] = 'true' # We don't want class diagrams in RDoc
|
|
2
2
|
require 'config/requirements'
|
3
3
|
require 'config/hoe' # setup Hoe + all gem configuration
|
4
4
|
|
5
|
-
Dir['gem_tasks/**/*.rake'].each { |rake| load rake }
|
5
|
+
Dir['gem_tasks/**/*.rake'].each { |rake| load rake }
|
6
|
+
|
7
|
+
# Hoe gives us :default => :test, but we don't have Test::Unit tests.
|
8
|
+
Rake::Task[:default].clear_prerequisites
|
9
|
+
task :default => [:spec, :features]
|
data/bin/cucumber
CHANGED
data/cucumber.yml
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
default: --format progress features
|
data/examples/calculator_ruby_features/features/{steps → step_definitons}/calculator_steps.rb
RENAMED
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,18 @@
|
|
1
|
+
h1. Internationalisation (i18n) examples
|
2
|
+
|
3
|
+
Under this directory you'll find examples of Cucumber features written in
|
4
|
+
many of the natural languages Cucumber supports.
|
5
|
+
|
6
|
+
For a full list of what languages Cucumber supports - run <pre>cucumber --help</pre>
|
7
|
+
|
8
|
+
h2. Running all the examples
|
9
|
+
|
10
|
+
Open a shell in this directory and run
|
11
|
+
|
12
|
+
<pre>rake i18n</pre>
|
13
|
+
|
14
|
+
h2. Running examples for a specific language
|
15
|
+
|
16
|
+
Open a shell in the directory for the specific language and run
|
17
|
+
|
18
|
+
<pre>rake features</pre>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
desc 'Run features for all languages'
|
2
|
+
task :i18n do
|
3
|
+
dir = File.dirname(__FILE__)
|
4
|
+
Dir["#{dir}/*"].each do |f|
|
5
|
+
if File.directory?(f)
|
6
|
+
lang = f[dir.length+1..-1]
|
7
|
+
Dir.chdir(f) do
|
8
|
+
rake("features")
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
def rake(args)
|
15
|
+
ruby(File.join(Gem.bindir, 'rake'), args)
|
16
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
خاصية: الجمع
|
2
|
+
من اجل تجنب الأخطاء السخيفة
|
3
|
+
كشخص غبي في الرياضيات
|
4
|
+
اريد معرفة ناتج جمع عددين
|
5
|
+
|
6
|
+
سيناريو: جمع عددين
|
7
|
+
بفرض كتابة ٥٠ في الآلة الحاسبة
|
8
|
+
و كتابة ٧٠ في الآلة الحاسبة
|
9
|
+
متى يتم الضغط على جمع
|
10
|
+
اذاً يظهر ١٢ على الشاشة
|
11
|
+
و الناتج يجب ان يكون Fixnum
|
12
|
+
|
13
|
+
امثلة اكثر:
|
14
|
+
| input_1 | input_2 | button | output | class |
|
15
|
+
| 20 | 30 | جمع | 50 | Fixnum |
|
16
|
+
| 2 | 5 | جمع | 7 | Fixnum |
|
17
|
+
| 0 | 40 | جمع | 40 | Fixnum |
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'spec'
|
2
|
+
$:.unshift(File.dirname(__FILE__) + '/../../lib')
|
3
|
+
require 'calculator'
|
4
|
+
|
5
|
+
Before do
|
6
|
+
@calc = Calculator.new
|
7
|
+
end
|
8
|
+
|
9
|
+
After do
|
10
|
+
end
|
11
|
+
|
12
|
+
Given "كتابة $n في الآلة الحاسبة" do |n|
|
13
|
+
@calc.push n.to_i
|
14
|
+
end
|
15
|
+
|
16
|
+
When /يتم الضغط على (\w+)/ do |op|
|
17
|
+
@result = @calc.send op
|
18
|
+
end
|
19
|
+
|
20
|
+
Then /يظهر (.*) على الشاشة/ do |result|
|
21
|
+
@result.should == result.to_f
|
22
|
+
end
|
23
|
+
|
24
|
+
Then /يجب ان يكون (\w*)/ do |class_name|
|
25
|
+
@result.class.name.should == class_name
|
26
|
+
end
|
27
|
+
|
28
|
+
Given /it should rain on (\w+)/ do |day|
|
29
|
+
@calc.rain?(day).should == true
|
30
|
+
end
|
31
|
+
|