cucumber 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (155) hide show
  1. data/History.txt +86 -3
  2. data/Manifest.txt +93 -44
  3. data/Rakefile +5 -1
  4. data/bin/cucumber +1 -0
  5. data/cucumber.yml +1 -1
  6. data/examples/calculator_ruby_features/features/{steps → step_definitons}/calculator_steps.rb +0 -0
  7. data/examples/cs/features/{steps → step_definitons}/hello_steps.rb +0 -0
  8. data/examples/cs/features/{steps → step_definitons}/tree_steps.rb +0 -0
  9. data/examples/i18n/README.textile +18 -0
  10. data/examples/i18n/Rakefile +16 -0
  11. data/examples/i18n/ar/Rakefile +6 -0
  12. data/examples/i18n/ar/features/addition.feature +17 -0
  13. data/examples/i18n/ar/features/step_definitons/calculator_steps.rb +31 -0
  14. data/examples/i18n/ar/lib/calculator.rb +10 -0
  15. data/examples/i18n/da/Rakefile +6 -0
  16. data/examples/{danish_calculator/features/steps → i18n/da/features/step_definitons}/kalkulator_steps.rb +0 -0
  17. data/examples/{danish_calculator → i18n/da}/features/summering.feature +1 -1
  18. data/examples/{danish_calculator → i18n/da}/lib/kalkulator.rb +0 -0
  19. data/examples/{swedish_calculator → i18n/en}/Rakefile +1 -1
  20. data/examples/{calculator → i18n/en}/features/addition.feature +0 -0
  21. data/examples/{calculator → i18n/en}/features/division.feature +0 -0
  22. data/examples/{calculator/features/steps → i18n/en/features/step_definitons}/calculator_steps.rb +0 -0
  23. data/examples/{calculator → i18n/en}/lib/calculator.rb +0 -2
  24. data/examples/i18n/es/Rakefile +6 -0
  25. data/examples/{spanish_calculator → i18n/es}/features/adicion.feature +1 -1
  26. data/examples/{spanish_calculator/features/steps → i18n/es/features/step_definitons}/calculador_steps.rb +0 -0
  27. data/examples/{spanish_calculator/lib/Calculador.rb → i18n/es/lib/calculador.rb} +0 -0
  28. data/examples/i18n/et/Rakefile +6 -0
  29. data/examples/i18n/et/features/liitmine.feature +17 -0
  30. data/examples/{estonian_calculator/features → i18n/et/features/step_definitions}/kalkulaator_steps.rb +2 -11
  31. data/examples/i18n/et/lib/kalkulaator.rb +10 -0
  32. data/examples/i18n/fr/Rakefile +6 -0
  33. data/examples/{calculatrice_francaise_avec_soit_scenario → i18n/fr}/features/addition.feature +0 -0
  34. data/examples/{calculatrice_francaise_avec_soit_scenario/features → i18n/fr/features/step_definitions}/calculatrice_steps.rb +2 -11
  35. data/examples/i18n/fr/lib/calculatrice.rb +10 -0
  36. data/examples/i18n/id/Rakefile +6 -0
  37. data/examples/i18n/id/features/addition.feature +17 -0
  38. data/examples/i18n/id/features/division.feature +10 -0
  39. data/examples/i18n/id/features/step_definitons/calculator_steps.rb +31 -0
  40. data/examples/i18n/id/lib/calculator.rb +14 -0
  41. data/examples/i18n/it/Rakefile +6 -0
  42. data/examples/i18n/it/features/somma.feature +10 -0
  43. data/examples/i18n/it/features/step_definitons/calcolatrice_steps.rb +22 -0
  44. data/examples/i18n/it/lib/calcolatrice.rb +11 -0
  45. data/examples/{calculator → i18n/ja}/README.txt +0 -0
  46. data/examples/i18n/ja/Rakefile +6 -0
  47. data/examples/i18n/ja/features/addition.feature +17 -0
  48. data/examples/i18n/ja/features/division.feature +10 -0
  49. data/examples/i18n/ja/features/step_definitons/calculator_steps.rb +30 -0
  50. data/examples/i18n/ja/lib/calculator.rb +14 -0
  51. data/examples/i18n/no/Rakefile +6 -0
  52. data/examples/{norwegian_calculator/features/steps → i18n/no/features/step_definitons}/kalkulator_steps.rb +0 -0
  53. data/examples/{norwegian_calculator → i18n/no}/features/summering.feature +0 -0
  54. data/examples/{norwegian_calculator → i18n/no}/lib/kalkulator.rb +0 -0
  55. data/examples/i18n/pt/Rakefile +6 -0
  56. data/examples/{portuguese_calculator → i18n/pt}/features/adicao.feature +0 -0
  57. data/examples/{portuguese_calculator/features → i18n/pt/features/step_definitions}/calculadora_steps.rb +2 -11
  58. data/examples/i18n/pt/lib/calculadora.rb +10 -0
  59. data/examples/i18n/ro/Rakefile +6 -0
  60. data/examples/i18n/ro/features/step_definitons/calculator_steps.rb +22 -0
  61. data/examples/i18n/ro/features/suma.feature +10 -0
  62. data/examples/i18n/ro/lib/calculator.rb +11 -0
  63. data/examples/i18n/se/Rakefile +6 -0
  64. data/examples/{swedish_calculator/features/steps → i18n/se/features/step_definitons}/kalkulator_steps.rb +0 -0
  65. data/examples/{swedish_calculator → i18n/se}/features/summering.feature +0 -0
  66. data/examples/{swedish_calculator → i18n/se}/lib/kalkulator.rb +0 -0
  67. data/examples/i18n/zh-CN/Rakefile +6 -0
  68. data/examples/{chinese_simplified_calculator → i18n/zh-CN}/features/addition.feature +0 -0
  69. data/examples/{chinese_simplified_calculator/features/steps → i18n/zh-CN/features/step_definitons}/calculator_steps.rb +0 -0
  70. data/examples/{chinese_simplified_calculator → i18n/zh-CN}/lib/calculator.rb +0 -0
  71. data/examples/java/features/{steps → step_definitons}/hello_steps.rb +0 -0
  72. data/examples/java/features/{steps → step_definitons}/tree_steps.rb +0 -0
  73. data/examples/selenium/features/{steps → step_definitons}/stories_steps.rb +0 -0
  74. data/examples/tickets/features/{steps → step_definitons}/tickets_steps.rb +0 -0
  75. data/examples/watir/features/search.feature +2 -2
  76. data/examples/watir/features/{steps → step_definitons}/stories_steps.rb +0 -0
  77. data/gem_tasks/treetop.rake +1 -9
  78. data/lib/autotest/cucumber.rb +6 -0
  79. data/lib/autotest/cucumber_mixin.rb +109 -0
  80. data/lib/autotest/cucumber_rails.rb +6 -0
  81. data/lib/autotest/cucumber_rails_rspec.rb +6 -0
  82. data/lib/autotest/cucumber_rspec.rb +6 -0
  83. data/lib/autotest/discover.rb +9 -0
  84. data/lib/cucumber.rb +4 -0
  85. data/lib/cucumber/broadcaster.rb +20 -0
  86. data/lib/cucumber/cli.rb +139 -48
  87. data/lib/cucumber/core_ext/proc.rb +2 -3
  88. data/lib/cucumber/executor.rb +59 -32
  89. data/lib/cucumber/formatters.rb +1 -1
  90. data/lib/cucumber/formatters/ansicolor.rb +3 -4
  91. data/lib/cucumber/formatters/autotest_formatter.rb +23 -0
  92. data/lib/cucumber/formatters/pretty_formatter.rb +99 -42
  93. data/lib/cucumber/formatters/progress_formatter.rb +21 -5
  94. data/lib/cucumber/languages.yml +125 -10
  95. data/lib/cucumber/rails/world.rb +1 -1
  96. data/lib/cucumber/rake/task.rb +52 -26
  97. data/lib/cucumber/step_mother.rb +7 -1
  98. data/lib/cucumber/tree/feature.rb +8 -6
  99. data/lib/cucumber/tree/scenario.rb +34 -15
  100. data/lib/cucumber/tree/step.rb +3 -1
  101. data/lib/cucumber/treetop_parser/feature.treetop.erb +15 -10
  102. data/lib/cucumber/treetop_parser/feature_ar.rb +1591 -0
  103. data/lib/cucumber/treetop_parser/feature_cy.rb +1591 -0
  104. data/lib/cucumber/treetop_parser/feature_da.rb +238 -240
  105. data/lib/cucumber/treetop_parser/feature_de.rb +238 -240
  106. data/lib/cucumber/treetop_parser/feature_en-tx.rb +1591 -0
  107. data/lib/cucumber/treetop_parser/feature_en.rb +238 -240
  108. data/lib/cucumber/treetop_parser/feature_es.rb +238 -240
  109. data/lib/cucumber/treetop_parser/feature_et.rb +238 -240
  110. data/lib/cucumber/treetop_parser/feature_fr.rb +238 -240
  111. data/lib/cucumber/treetop_parser/feature_id.rb +1591 -0
  112. data/lib/cucumber/treetop_parser/feature_it.rb +1591 -0
  113. data/lib/cucumber/treetop_parser/feature_ja.rb +1591 -0
  114. data/lib/cucumber/treetop_parser/feature_nl.rb +238 -240
  115. data/lib/cucumber/treetop_parser/feature_no.rb +238 -240
  116. data/lib/cucumber/treetop_parser/feature_pl.rb +1591 -0
  117. data/lib/cucumber/treetop_parser/feature_pt.rb +238 -240
  118. data/lib/cucumber/treetop_parser/feature_ro.rb +1591 -0
  119. data/lib/cucumber/treetop_parser/feature_ro2.rb +1591 -0
  120. data/lib/cucumber/treetop_parser/feature_ru.rb +238 -240
  121. data/lib/cucumber/treetop_parser/feature_se.rb +238 -240
  122. data/lib/cucumber/treetop_parser/feature_zh-CN.rb +238 -240
  123. data/lib/cucumber/version.rb +1 -1
  124. data/rails_generators/cucumber/USAGE +11 -0
  125. data/rails_generators/cucumber/cucumber_generator.rb +9 -6
  126. data/rails_generators/cucumber/templates/cucumber +6 -1
  127. data/rails_generators/cucumber/templates/{common_webrat.rb → webrat_steps.rb} +4 -0
  128. data/rails_generators/feature/USAGE +12 -0
  129. data/rails_generators/feature/feature_generator.rb +3 -4
  130. data/spec/cucumber/broadcaster_spec.rb +27 -0
  131. data/spec/cucumber/cli_spec.rb +211 -23
  132. data/spec/cucumber/executor_spec.rb +104 -14
  133. data/spec/cucumber/formatters/ansicolor_spec.rb +9 -1
  134. data/spec/cucumber/formatters/autotest_formatter_spec.rb +26 -0
  135. data/spec/cucumber/formatters/pretty_formatter_spec.rb +119 -26
  136. data/spec/cucumber/formatters/profile_formatter_spec.rb +1 -2
  137. data/spec/cucumber/formatters/progress_formatter_spec.rb +22 -1
  138. data/spec/cucumber/sell_cucumbers.feature +10 -0
  139. data/spec/cucumber/step_mother_spec.rb +21 -0
  140. data/spec/cucumber/tree/row_scenario_spec.rb +25 -0
  141. data/spec/cucumber/tree/scenario_spec.rb +47 -8
  142. data/spec/cucumber/tree/step_spec.rb +19 -0
  143. data/spec/cucumber/treetop_parser/feature_parser_spec.rb +2 -0
  144. data/spec/cucumber/treetop_parser/multiline_steps.feature +7 -3
  145. data/spec/spec_helper.rb +2 -0
  146. metadata +97 -48
  147. data/examples/calculator/Rakefile +0 -5
  148. data/examples/calculatrice_francaise_avec_soit_scenario/Rakefile +0 -6
  149. data/examples/chinese_simplified_calculator/Rakefile +0 -6
  150. data/examples/danish_calculator/Rakefile +0 -6
  151. data/examples/estonian_calculator/Rakefile +0 -6
  152. data/examples/estonian_calculator/features/liitmine.feature +0 -16
  153. data/examples/norwegian_calculator/Rakefile +0 -6
  154. data/examples/portuguese_calculator/Rakefile +0 -6
  155. data/examples/spanish_calculator/Rakefile +0 -6
@@ -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 | 234 |
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!
@@ -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/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
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/steps/hello_steps.rb
31
- examples/cs/features/steps/tree_steps.rb
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/estonian_calculator/Rakefile
41
- examples/estonian_calculator/features/kalkulaator_steps.rb
42
- examples/estonian_calculator/features/liitmine.feature
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/steps/hello_steps.rb
47
- examples/java/features/steps/tree_steps.rb
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/steps/stories_steps.rb
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/steps/tickets_steps.rb
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/steps/stories_steps.rb
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]
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+
2
3
  $:.unshift(File.dirname(__FILE__) + '/../lib') unless $:.include?(File.dirname(__FILE__) + '/../lib')
3
4
  require 'cucumber/cli'
4
5
  Cucumber::CLI.execute
@@ -1 +1 @@
1
- rest: --format progress features
1
+ default: --format progress features
@@ -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,6 @@
1
+ $:.unshift(File.dirname(__FILE__) + '/../../../lib')
2
+ require 'cucumber/rake/task'
3
+
4
+ Cucumber::Rake::Task.new do |t|
5
+ t.cucumber_opts = "--language ar"
6
+ 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
+