Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Hacks to accomodate for IronRuby

  • Loading branch information...
commit bd4e9b69e72df6209c06c84a5c9ac116ca6485a4 2 parents 2062d94 + c679c83
@aslakhellesoy aslakhellesoy authored
Showing with 26,039 additions and 2,414 deletions.
  1. +7 −2 .gitignore
  2. +235 −10 History.txt
  3. +121 −43 Manifest.txt
  4. +1 −2  README.txt
  5. +6 −1 Rakefile
  6. +1 −0  bin/cucumber
  7. +46 −0 cucumber.gemspec
  8. +1 −1  cucumber.yml
  9. +0 −6 examples/calculator/Rakefile
  10. +0 −1  examples/calculator/cucumber.yml
  11. +1 −1  examples/calculator_ruby_features/features/addition.rb
  12. 0  examples/calculator_ruby_features/features/{steps → step_definitons}/calculator_steps.rb
  13. +0 −6 examples/calculatrice_francaise_avec_soit_scenario/Rakefile
  14. 0  examples/cs/features/{steps → step_definitons}/hello_steps.rb
  15. 0  examples/cs/features/{steps → step_definitons}/tree_steps.rb
  16. +0 −6 examples/danish_calculator/Rakefile
  17. +0 −6 examples/estonian_calculator/Rakefile
  18. +0 −16 examples/estonian_calculator/features/liitmine.feature
  19. +18 −0 examples/i18n/README.textile
  20. +16 −0 examples/i18n/Rakefile
  21. +6 −0 examples/i18n/ar/Rakefile
  22. +17 −0 examples/i18n/ar/features/addition.feature
  23. +31 −0 examples/i18n/ar/features/step_definitons/calculator_steps.rb
  24. +10 −0 examples/i18n/ar/lib/calculator.rb
  25. +6 −0 examples/i18n/da/Rakefile
  26. 0  examples/{danish_calculator/features/steps → i18n/da/features/step_definitons}/kalkulator_steps.rb
  27. +1 −1  examples/{danish_calculator → i18n/da}/features/summering.feature
  28. 0  examples/{norwegian_calculator → i18n/da}/lib/kalkulator.rb
  29. +1 −0  examples/i18n/de/.gitignore
  30. +6 −0 examples/i18n/de/Rakefile
  31. +17 −0 examples/i18n/de/features/addition.feature
  32. +10 −0 examples/i18n/de/features/division.feature
  33. +30 −0 examples/i18n/de/features/step_definitons/calculator_steps.rb
  34. +0 −2  examples/{calculator → i18n/de}/lib/calculator.rb
  35. +1 −0  examples/i18n/en/.gitignore
  36. +6 −0 examples/i18n/en/Rakefile
  37. +1 −0  examples/{calculator → i18n/en}/features/addition.feature
  38. 0  examples/{calculator → i18n/en}/features/division.feature
  39. 0  examples/{calculator/features/steps → i18n/en/features/step_definitons}/calculator_steps.rb
  40. +14 −0 examples/i18n/en/lib/calculator.rb
  41. +6 −0 examples/i18n/es/Rakefile
  42. +1 −1  examples/{spanish_calculator → i18n/es}/features/adicion.feature
  43. 0  examples/{spanish_calculator/features/steps → i18n/es/features/step_definitons}/calculador_steps.rb
  44. 0  examples/{spanish_calculator/lib/Calculador.rb → i18n/es/lib/calculador.rb}
  45. +6 −0 examples/i18n/et/Rakefile
  46. +17 −0 examples/i18n/et/features/liitmine.feature
  47. +2 −11 examples/{estonian_calculator/features → i18n/et/features/step_definitions}/kalkulaator_steps.rb
  48. +10 −0 examples/i18n/et/lib/kalkulaator.rb
  49. +6 −0 examples/i18n/fr/Rakefile
  50. 0  examples/{calculatrice_francaise_avec_soit_scenario → i18n/fr}/features/addition.feature
  51. +2 −11 ...trice_francaise_avec_soit_scenario/features → i18n/fr/features/step_definitions}/calculatrice_steps.rb
  52. +10 −0 examples/i18n/fr/lib/calculatrice.rb
  53. +1 −0  examples/i18n/id/.gitignore
  54. +6 −0 examples/i18n/id/Rakefile
  55. +17 −0 examples/i18n/id/features/addition.feature
  56. +10 −0 examples/i18n/id/features/division.feature
  57. +31 −0 examples/i18n/id/features/step_definitons/calculator_steps.rb
  58. +14 −0 examples/i18n/id/lib/calculator.rb
  59. +6 −0 examples/i18n/it/Rakefile
  60. +10 −0 examples/i18n/it/features/somma.feature
  61. +22 −0 examples/i18n/it/features/step_definitons/calcolatrice_steps.rb
  62. +11 −0 examples/i18n/it/lib/calcolatrice.rb
  63. +1 −0  examples/i18n/ja/.gitignore
  64. +5 −0 examples/i18n/ja/README.txt
  65. +6 −0 examples/i18n/ja/Rakefile
  66. +17 −0 examples/i18n/ja/features/addition.feature
  67. +10 −0 examples/i18n/ja/features/division.feature
  68. +30 −0 examples/i18n/ja/features/step_definitons/calculator_steps.rb
  69. +14 −0 examples/i18n/ja/lib/calculator.rb
  70. +6 −0 examples/i18n/no/Rakefile
  71. 0  examples/{norwegian_calculator/features/steps → i18n/no/features/step_definitons}/kalkulator_steps.rb
  72. 0  examples/{norwegian_calculator → i18n/no}/features/summering.feature
  73. 0  examples/{danish_calculator → i18n/no}/lib/kalkulator.rb
  74. +6 −0 examples/i18n/pt/Rakefile
  75. 0  examples/{portuguese_calculator → i18n/pt}/features/adicao.feature
  76. +2 −11 examples/{portuguese_calculator/features → i18n/pt/features/step_definitions}/calculadora_steps.rb
  77. +10 −0 examples/i18n/pt/lib/calculadora.rb
  78. +6 −0 examples/i18n/ro/Rakefile
  79. +22 −0 examples/i18n/ro/features/step_definitons/calculator_steps.rb
  80. +10 −0 examples/i18n/ro/features/suma.feature
  81. +11 −0 examples/i18n/ro/lib/calculator.rb
  82. +6 −0 examples/i18n/se/Rakefile
  83. +22 −0 examples/i18n/se/features/step_definitons/kalkulator_steps.rb
  84. +17 −0 examples/i18n/se/features/summering.feature
  85. +11 −0 examples/i18n/se/lib/kalkulator.rb
  86. +6 −0 examples/i18n/zh-CN/Rakefile
  87. +17 −0 examples/i18n/zh-CN/features/addition.feature
  88. +24 −0 examples/i18n/zh-CN/features/step_definitons/calculator_steps.rb
  89. +10 −0 examples/i18n/zh-CN/lib/calculator.rb
  90. +1 −1  examples/java/features/{steps → step_definitons}/hello_steps.rb
  91. 0  examples/java/features/{steps → step_definitons}/tree_steps.rb
  92. +0 −6 examples/norwegian_calculator/Rakefile
  93. +0 −6 examples/portuguese_calculator/Rakefile
  94. 0  examples/selenium/features/{steps → step_definitons}/stories_steps.rb
  95. +0 −6 examples/spanish_calculator/Rakefile
  96. +8 −1 examples/tickets/Rakefile
  97. +2 −0  examples/tickets/cucumber.yml
  98. +32 −0 examples/tickets/features/step_definitons/tickets_steps.rb
  99. +0 −23 examples/tickets/features/steps/tickets_steps.rb
  100. +15 −2 examples/tickets/features/tickets.feature
  101. +2 −2 examples/watir/features/search.feature
  102. 0  examples/watir/features/{steps → step_definitons}/stories_steps.rb
  103. +28 −14 gem_tasks/treetop.rake
  104. +0 −17 gem_tasks/website.rake
  105. +0 −27 generators/cucumber/cucumber_generator.rb
  106. +0 −51 generators/cucumber/templates/common_webrat.rb
  107. +0 −2  generators/cucumber/templates/cucumber
  108. +6 −0 lib/autotest/cucumber.rb
  109. +109 −0 lib/autotest/cucumber_mixin.rb
  110. +6 −0 lib/autotest/cucumber_rails.rb
  111. +6 −0 lib/autotest/cucumber_rails_rspec.rb
  112. +6 −0 lib/autotest/cucumber_rspec.rb
  113. +9 −0 lib/autotest/discover.rb
  114. +5 −0 lib/cucumber.rb
  115. +20 −0 lib/cucumber/broadcaster.rb
  116. +161 −45 lib/cucumber/cli.rb
  117. +10 −8 lib/cucumber/core_ext/proc.rb
  118. +97 −32 lib/cucumber/executor.rb
  119. +1 −1  lib/cucumber/formatters.rb
  120. +3 −4 lib/cucumber/formatters/ansicolor.rb
  121. +23 −0 lib/cucumber/formatters/autotest_formatter.rb
  122. +6 −3 lib/cucumber/formatters/html_formatter.rb
  123. +123 −44 lib/cucumber/formatters/pretty_formatter.rb
  124. +92 −0 lib/cucumber/formatters/profile_formatter.rb
  125. +21 −5 lib/cucumber/formatters/progress_formatter.rb
  126. +162 −19 lib/cucumber/languages.yml
  127. +1 −0  lib/cucumber/model.rb
  128. +28 −0 lib/cucumber/model/table.rb
  129. +2 −4 lib/cucumber/rails/world.rb
  130. +53 −27 lib/cucumber/rake/task.rb
  131. +8 −4 lib/cucumber/step_methods.rb
  132. +6 −1 lib/cucumber/step_mother.rb
  133. +18 −8 lib/cucumber/tree/feature.rb
  134. +72 −20 lib/cucumber/tree/scenario.rb
  135. +8 −5 lib/cucumber/tree/step.rb
  136. +63 −16 lib/cucumber/treetop_parser/feature.treetop.erb
  137. +1,591 −0 lib/cucumber/treetop_parser/feature_ar.rb
  138. +1,591 −0 lib/cucumber/treetop_parser/feature_cy.rb
  139. +490 −124 lib/cucumber/treetop_parser/feature_da.rb
  140. +492 −126 lib/cucumber/treetop_parser/feature_de.rb
  141. +1,591 −0 lib/cucumber/treetop_parser/feature_en-tx.rb
  142. +490 −124 lib/cucumber/treetop_parser/feature_en.rb
  143. +490 −124 lib/cucumber/treetop_parser/feature_es.rb
  144. +490 −124 lib/cucumber/treetop_parser/feature_et.rb
  145. +490 −124 lib/cucumber/treetop_parser/feature_fr.rb
  146. +1,591 −0 lib/cucumber/treetop_parser/feature_id.rb
  147. +1,591 −0 lib/cucumber/treetop_parser/feature_it.rb
  148. +1,591 −0 lib/cucumber/treetop_parser/feature_ja.rb
  149. +1,591 −0 lib/cucumber/treetop_parser/feature_nl.rb
  150. +490 −124 lib/cucumber/treetop_parser/feature_no.rb
  151. +4 −2 lib/cucumber/treetop_parser/feature_parser.rb
  152. +1,591 −0 lib/cucumber/treetop_parser/feature_pl.rb
  153. +490 −124 lib/cucumber/treetop_parser/feature_pt.rb
  154. +1,591 −0 lib/cucumber/treetop_parser/feature_ro.rb
  155. +1,591 −0 lib/cucumber/treetop_parser/feature_ro2.rb
  156. +490 −124 lib/cucumber/treetop_parser/feature_ru.rb
  157. +494 −128 lib/cucumber/treetop_parser/feature_se.rb
  158. +1,591 −0 lib/cucumber/treetop_parser/feature_zh-CN.rb
  159. +1 −1  lib/cucumber/version.rb
  160. +11 −0 rails_generators/cucumber/USAGE
  161. +30 −0 rails_generators/cucumber/cucumber_generator.rb
  162. +7 −0 rails_generators/cucumber/templates/cucumber
  163. 0  {generators → rails_generators}/cucumber/templates/cucumber.rake
  164. 0  {generators → rails_generators}/cucumber/templates/env.rb
  165. +95 −0 rails_generators/cucumber/templates/webrat_steps.rb
  166. +12 −0 rails_generators/feature/USAGE
  167. +3 −4 {generators → rails_generators}/feature/feature_generator.rb
  168. +4 −3 {generators → rails_generators}/feature/templates/feature.erb
  169. 0  {generators → rails_generators}/feature/templates/steps.erb
  170. +27 −0 spec/cucumber/broadcaster_spec.rb
  171. +252 −22 spec/cucumber/cli_spec.rb
  172. +6 −0 spec/cucumber/core_ext/proc_spec.rb
  173. +162 −21 spec/cucumber/executor_spec.rb
  174. +9 −1 spec/cucumber/formatters/ansicolor_spec.rb
  175. +26 −0 spec/cucumber/formatters/autotest_formatter_spec.rb
  176. +16 −1 spec/cucumber/formatters/html_formatter_spec.rb
  177. +158 −36 spec/cucumber/formatters/pretty_formatter_spec.rb
  178. +192 −0 spec/cucumber/formatters/profile_formatter_spec.rb
  179. +22 −1 spec/cucumber/formatters/progress_formatter_spec.rb
  180. +20 −0 spec/cucumber/model/table_spec.rb
  181. +17 −0 spec/cucumber/rails/stubs/mini_rails.rb
  182. +1 −0  spec/cucumber/rails/stubs/test_help.rb
  183. +11 −0 spec/cucumber/rails/world_spec.rb
  184. +10 −0 spec/cucumber/sell_cucumbers.feature
  185. +14 −0 spec/cucumber/step_mother_spec.rb
  186. +43 −0 spec/cucumber/tree/feature_spec.rb
  187. +55 −0 spec/cucumber/tree/row_scenario_spec.rb
  188. +63 −2 spec/cucumber/tree/scenario_spec.rb
  189. +31 −2 spec/cucumber/tree/step_spec.rb
  190. +1 −1  spec/cucumber/treetop_parser/empty_scenario.feature
  191. +20 −0 spec/cucumber/treetop_parser/feature_parser_spec.rb
  192. +1 −0  spec/cucumber/treetop_parser/fit_scenario.feature
  193. +17 −0 spec/cucumber/treetop_parser/multiline_steps.feature
  194. +2 −0  spec/cucumber/treetop_parser/multiple_tables.feature
  195. +1 −0  spec/cucumber/treetop_parser/test_dos.feature
  196. +6 −2 spec/cucumber/treetop_parser/with_comments.feature
  197. +2 −6 spec/spec_helper.rb
  198. +0 −11 website/index.html
  199. +0 −39 website/index.txt
  200. +0 −285 website/javascripts/rounded_corners_lite.inc.js
  201. +0 −138 website/stylesheets/screen.css
  202. +0 −48 website/template.html.erb
View
9 .gitignore
@@ -1,5 +1,10 @@
nbproject
pkg
doc
-log/*.log
-.eprj
+*.log
+*.pid
+.eprj
+.tmtags
+*~
+.DS_Store
+*.swp
View
245 History.txt
@@ -1,16 +1,241 @@
-== 0.1.7 (Not yet released as gem)
+== 0.1.10 (In Git)
-Bla bla
+Running multiple features at specific lines numbers:
-* Bugfixes
-** Fixed a bug in the command line args being lost when using --profile (#27, Joseph Wilk)
-** Fixed a bug in Webrat selects (Tim Glen)
+cucumber examples/i18n/en/features/addition.feature:15 examples/i18n/en/features/division.feature:6
-* New features
-** Added But keyword to all languages (#21, Aslak Hellesøy)
-** Added --source option to display step definition location next to step text (#26, Joseph Wilk)
-** Added more Webrat steps (#25, Tim Glen)
+Will run addition.feature at line 15 and divison.feature at line 6
-== 0.1.6
+=== New features
+* New webrat step defintions to wrap the new selects_time, selects_date, and selects_datetime methods. (Ben Mabey)
+* Try to load webrat gem if it's not installed as a plugin (Aslak Hellesøy)
+* Support example.feature:20 or example.feature:10:20:30 syntax for running features at specific line number(s). (#88 Joseph Wilk)
+
+=== Bugfixes
+* Features written using Ruby where breaking due to missing a line number (#91 Joseph Wilk)
+* Directly creating a Table meant the scenario table header was never set which was causing a formatter error (#91 Joseph Wilk)
+
+=== Removed features
+* Step definition without a block being treated as pending (#64 Joseph Wilk)
+* The --line option has been removed. Use the new file.feature:line format instead.
+
+== 0.1.9
+
+With this release Cucumber supports 19 (!) natural languages:
+
+* Arabic
+* Chinese Simplified
+* Danish
+* Dutch
+* Estonian
+* French
+* German
+* Italian
+* Japanese
+* Malay
+* Norwegian
+* Polish
+* Portuguese
+* Romanian
+* Russian
+* Spanish
+* Swedish
+* Texan
+* Welsh
+
+Thanks a lot to everyone who has contributed translations. If you don't see your language here, please
+add it: http://github.com/aslakhellesoy/cucumber/wikis/spoken-languages
+
+Main functional changes in this release is "Autotest":http://github.com/aslakhellesoy/cucumber/wikis/autotest-integration
+support and how multiline strings work in feature files:
+
+ # In your .feature file
+ Then I should see
+ """
+ A string
+ that "indents"
+ and spans
+ several lines
+
+ """
+
+ # In your steps.rb file
+ Then 'I should see' do |text|
+ text.should == "A string\n that \"indents\"\nand spans\nseveral lines\n"
+ end
+
+The triple quotes are used to define the start and end of a string, and it also defines what gets stripped away
+in the inside string. If the triple quotes are indented 4 spaces, then the text within will have the 4 first
+spaces removed too.
+
+=== New features
+* Added --[no-]color option to force color on or off (Peter Jaros)
+* Step definition without a block will be treated as pending (#64 Joseph Wilk)
+* Added support for Welsh (improvements welcome) (Joseph Wilk)
+* Added --quiet option to hide all development aid output when using Pretty formatter (#69 Joseph Wilk)
+* Added --no-snippets option to hide snippets for pending steps when using Pretty formatter (#69 Joseph Wilk)
+* Added error messages concerning cucumber.yml. (#70 Ben Mabey)
+* Added Autotest support - work in progress... (Peter Jaros)
+* Added new --exclude option (Bryan Helkamp)
+* Added new --scenario option (Peter Jaros)
+* Renamed common_webrat.rb to webrat_steps.rb (Ben Mabey, Aslak Hellesøy)
+* Added new feature[:feature_path] task (Roman Gonzalez)
+* Added support for Polish (Joseph Wilk)
+* Support specifying multiple formatters and multiple outputs (#47 Joseph Wilk)
+* Added support for Japanese. (Kakutani Shintaro)
+* Added support for Texan (improvements welcome). (Aslak Hellesøy)
+
+=== Bugfixes
+* Pending step snippets should escape special Regexp characters (#82 Joseph Wilk)
+* Scenario without a body shouldn't show up as complete (#63 Josh Knowles)
+* Fixed bug where utf-8 strings where breaking comment alighments. (#79 Joseph Wilk)
+* Fixed next_column_index not resetting after large tables (#60, Barry Mitchelson)
+* The HTML formatter was rendering everything twice. Cannot invoke visit_feature on formatters in executor (#72 Joseph Wilk)
+* Row Scenarios need to support pending? in order for the Profile formatter to work (Joseph Wilk)
+* Snippets are not shown for steps which already have a step definition (#65 Joseph Wilk)
+* Prevent feature/scenario/pending step comments from containing '//' when running features by specifying a directory with a trailing '/' (Joseph Wilk)
+* Scenario tables need spacing after them (#59 Joseph Wilk)
+* Support running scenario table rows when using --line argument (#55 Joseph Wilk)
+* Don't load cucumber.yml unless it exists (Aslak Hellesøy)
+* 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)
+
+=== Removed features
+
+
+== 0.1.8 2008-10-18
+
+This release extends the support for tables. PLEASE NOTE THAT TABLES ARE STILL EXPERIMENTAL.
+In previous releases it has been possible to use tables to define "more examples" of a scenario i
+n a FIT-style column fixture kind of way. Now you can also use tables as arguments to steps.
+
+Tables used to define more examples after a scenario must now be prefixed. In English it looks like this:
+
+ Feature: Addition
+ In order to avoid silly mistakes
+ As a math idiot
+ I want to be told the sum of two numbers
+
+ Scenario: Add two numbers
+ Given I have entered 50 into the calculator
+ And I have entered 70 into the calculator
+ When I press add
+ Then the result should be 120 on the screen
+ And the result class should be Fixnum
+
+ More Examples:
+ | input_1 | input_2 | button | output | class |
+ | 20 | 30 | add | 50 | Fixnum |
+ | 2 | 5 | add | 7 | Fixnum |
+ | 0 | 40 | add | 40 | Fixnum |
+
+Languages that are not updated yet will have to use "More Examples" until we get the translations.
+
+Tables can also be used as arguments to individual steps. In fact, steps now support a single argument
+that can span several lines. This can be a table or a string.
+
+Example:
+
+ Given the following people exist:
+ | name | email | phone |
+ | Aslak | aslak@email.com | 123 |
+ | Joe | joe@email.com | 234 |
+ | Bryan | bryan@email.org | 456 |
+ When I search for email.com
+ Then I should see:
+ | name | email | phone |
+ | Aslak | aslak@email.com | 123 |
+ | Joe | joe@email.com | 234 |
+ And I should see:
+ "Some text
+ on several lines"
+
+The step definitions for such multiline steps must define an extra block argument for the argument:
+
+ Given /the following people exist:/ do |people_table|
+ # people_table is of type Cucumber::Model::Table
+ # See RDoc for more info
+ end
+
+ Then /I should see:/ do |string|
+ # string is a plain old ruby String with leading spaces on each line removed
+ end
+
+=== New features
+* Added profile formatter. (#35, Joseph Wilk)
+* Added support for Chinese Simplified. (Liming Lian)
+* Added support for Dutch. (Sjoerd Tieleman)
+* Multiline steps are now supported. (#4, Aslak Hellesøy)
+* Tables used to define more examples for a scenario must be prefixed "More Examples" (see languages.yml for other languages)
+* Show the file and line number for scenarios as a comment when displaying with the pretty formatter. (#40, Joseph Wilk)
+* Show the file for the feature as a comment when displaying with the pretty formatter. (#40, Joseph Wilk)
+* Show the feature file and line for pending steps as a comment when displaying with the pretty formatter. (#40, Joseph Wilk)
+
+=== Bugfixes
+* Fixed speling errors in Spanish (Daniel Cadenas)
+* ActionMailer delivery_method should not be set to test (#41, Luke Melia)
+* Reverse incorrectly ordered args in webrat select step (#43, David Chelimsky)
+* Support comments above the first scenario (#31, Aslak Hellesøy)
+* Fixed the HTML Formatter to use actual values for FIT table headers (#30, Joseph Wilk)
+
+=== Removed features
+* Removed the /^I go to (.*)$/ step from common_webrat.rb - it's not language agnostic and provides little value.
+
+=== New features
+* Added new --out option to make it easier to specify output from Rake and cucumber.yml
+
+== 0.1.7 2008-10-05
+
+This release fixes a few bugs and adds some new features. The most notable features are:
+
+=== Calling steps from steps
+
+Step definitions are a little bit closer to having regular method semantics.
+You define them, but now you can also call them from other steps. Here is an
+example:
+
+ Given /I am logged in as an (.*) named (.*)$/ do |role, name|
+ Given "I am registered as #{role}, #{name}, secret"
+ When "I log in with #{name}, secret"
+ end
+
+ Given /I am registered as (.*), (.*), (.*)/ do |role, name, password|
+ # (Code removed for brevity)
+ end
+
+ When /I log in with (.*), (.*)/ do |name, password|
+ # (Code removed for brevity)
+ end
+
+This means that steps can be reused in other steps. The GivenScenario feature achieves a similar
+effect (on the scenario level), but this feature is something we're not very happy with, mostly
+because it's not parameterisable. Calling steps from steps is.
+
+GivenScenario will still be working several releases, but the plan is to remove it completely in
+the 0.3.0 release.
+
+=== Seeing where a step is defined
+
+Prior to this release it could be hard to find out where the ruby step definition matching
+a plain text step is defined. Not anymore! Cucumber will now output this:
+
+ Scenario: Regular numbers
+ Given I have entered 3 into the calculator # features/steps/calculator_steps.rb:12
+ And I have entered 2 into the calculator # features/steps/calculator_steps.rb:12
+ When I press divide # features/steps/calculator_steps.rb:16
+ Then the result should be 1.5 on the screen # features/steps/calculator_steps.rb:20
+ And the result class should be Float # features/steps/calculator_steps.rb:24
+
+=== Bugfixes
+* Fixed a bug in the command line args being lost when using --profile (#27, Joseph Wilk)
+* Fixed a bug in Webrat selects (Tim Glen)
+* Fixed parsing of DOS line endings (#2, #28, Aslak Hellesøy)
+
+=== New features
+* Steps can be called from other steps (#3, Bryan Helmkamp, Aslak Hellesøy)
+* Added But keyword to all languages (#21, Aslak Hellesøy)
+* Added --no-source option to display step definition location next to step text (#26, Joseph Wilk, Aslak Hellesøy)
+* Added more Webrat steps (#25, Tim Glen)
+
+== 0.1.6 2008-10-01
First gem release!
View
164 Manifest.txt
@@ -8,59 +8,102 @@ bin/cucumber
config/hoe.rb
config/requirements.rb
cucumber.yml
-examples/calculator/Rakefile
-examples/calculator/cucumber.yml
-examples/calculator/features/addition.feature
-examples/calculator/features/division.feature
-examples/calculator/features/steps/calculator_steps.rb
-examples/calculator/lib/calculator.rb
examples/calculator_ruby_features/Rakefile
examples/calculator_ruby_features/features/addition.rb
-examples/calculator_ruby_features/features/steps/calculator_steps.rb
-examples/calculatrice_francaise_avec_soit_scenario/Rakefile
-examples/calculatrice_francaise_avec_soit_scenario/features/addition.feature
-examples/calculatrice_francaise_avec_soit_scenario/features/calculatrice_steps.rb
+examples/calculator_ruby_features/features/step_definitons/calculator_steps.rb
examples/cs/README.textile
examples/cs/Rakefile
examples/cs/features/hello.feature
-examples/cs/features/steps/hello_steps.rb
-examples/cs/features/steps/tree_steps.rb
+examples/cs/features/step_definitons/hello_steps.rb
+examples/cs/features/step_definitons/tree_steps.rb
examples/cs/features/tree.feature
examples/cs/src/Hello.cs
-examples/danish_calculator/Rakefile
-examples/danish_calculator/features/steps/kalkulator_steps.rb
-examples/danish_calculator/features/summering.feature
-examples/danish_calculator/lib/kalkulator.rb
-examples/estonian_calculator/Rakefile
-examples/estonian_calculator/features/kalkulaator_steps.rb
-examples/estonian_calculator/features/liitmine.feature
+examples/dos_line_endings/Rakefile
+examples/dos_line_endings/features/dos_line_endings.feature
+examples/i18n/README.textile
+examples/i18n/Rakefile
+examples/i18n/ar/Rakefile
+examples/i18n/ar/features/addition.feature
+examples/i18n/ar/features/step_definitons/calculator_steps.rb
+examples/i18n/ar/lib/calculator.rb
+examples/i18n/da/Rakefile
+examples/i18n/da/features/step_definitons/kalkulator_steps.rb
+examples/i18n/da/features/summering.feature
+examples/i18n/da/lib/kalkulator.rb
+examples/i18n/de/Rakefile
+examples/i18n/de/features/addition.feature
+examples/i18n/de/features/division.feature
+examples/i18n/de/features/step_definitons/calculator_steps.rb
+examples/i18n/de/lib/calculator.rb
+examples/i18n/en/Rakefile
+examples/i18n/en/features/addition.feature
+examples/i18n/en/features/division.feature
+examples/i18n/en/features/step_definitons/calculator_steps.rb
+examples/i18n/en/lib/calculator.rb
+examples/i18n/es/Rakefile
+examples/i18n/es/features/adicion.feature
+examples/i18n/es/features/step_definitons/calculador_steps.rb
+examples/i18n/es/lib/calculador.rb
+examples/i18n/et/Rakefile
+examples/i18n/et/features/liitmine.feature
+examples/i18n/et/features/step_definitions/kalkulaator_steps.rb
+examples/i18n/et/lib/kalkulaator.rb
+examples/i18n/fr/Rakefile
+examples/i18n/fr/features/addition.feature
+examples/i18n/fr/features/step_definitions/calculatrice_steps.rb
+examples/i18n/fr/lib/calculatrice.rb
+examples/i18n/id/Rakefile
+examples/i18n/id/features/addition.feature
+examples/i18n/id/features/division.feature
+examples/i18n/id/features/step_definitons/calculator_steps.rb
+examples/i18n/id/lib/calculator.rb
+examples/i18n/it/Rakefile
+examples/i18n/it/features/somma.feature
+examples/i18n/it/features/step_definitons/calcolatrice_steps.rb
+examples/i18n/it/lib/calcolatrice.rb
+examples/i18n/ja/README.txt
+examples/i18n/ja/Rakefile
+examples/i18n/ja/features/addition.feature
+examples/i18n/ja/features/division.feature
+examples/i18n/ja/features/step_definitons/calculator_steps.rb
+examples/i18n/ja/lib/calculator.rb
+examples/i18n/no/Rakefile
+examples/i18n/no/features/step_definitons/kalkulator_steps.rb
+examples/i18n/no/features/summering.feature
+examples/i18n/no/lib/kalkulator.rb
+examples/i18n/pt/Rakefile
+examples/i18n/pt/features/adicao.feature
+examples/i18n/pt/features/step_definitions/calculadora_steps.rb
+examples/i18n/pt/lib/calculadora.rb
+examples/i18n/ro/Rakefile
+examples/i18n/ro/features/step_definitons/calculator_steps.rb
+examples/i18n/ro/features/suma.feature
+examples/i18n/ro/lib/calculator.rb
+examples/i18n/se/Rakefile
+examples/i18n/se/features/step_definitons/kalkulator_steps.rb
+examples/i18n/se/features/summering.feature
+examples/i18n/se/lib/kalkulator.rb
+examples/i18n/zh-CN/Rakefile
+examples/i18n/zh-CN/features/addition.feature
+examples/i18n/zh-CN/features/step_definitons/calculator_steps.rb
+examples/i18n/zh-CN/lib/calculator.rb
examples/java/README.textile
examples/java/Rakefile
examples/java/features/hello.feature
-examples/java/features/steps/hello_steps.rb
-examples/java/features/steps/tree_steps.rb
+examples/java/features/step_definitons/hello_steps.rb
+examples/java/features/step_definitons/tree_steps.rb
examples/java/features/tree.feature
examples/java/src/cucumber/demo/Hello.java
-examples/norwegian_calculator/Rakefile
-examples/norwegian_calculator/features/steps/kalkulator_steps.rb
-examples/norwegian_calculator/features/summering.feature
-examples/norwegian_calculator/lib/kalkulator.rb
-examples/portuguese_calculator/Rakefile
-examples/portuguese_calculator/features/adicao.feature
-examples/portuguese_calculator/features/calculadora_steps.rb
examples/selenium/Rakefile
examples/selenium/features/search.feature
-examples/selenium/features/steps/stories_steps.rb
-examples/spanish_calculator/Rakefile
-examples/spanish_calculator/features/adicion.feature
-examples/spanish_calculator/features/steps/calculador_steps.rb
-examples/spanish_calculator/lib/Calculador.rb
+examples/selenium/features/step_definitons/stories_steps.rb
examples/tickets/Rakefile
-examples/tickets/features/steps/tickets_steps.rb
+examples/tickets/cucumber.yml
+examples/tickets/features/step_definitons/tickets_steps.rb
examples/tickets/features/tickets.feature
examples/watir/Rakefile
examples/watir/features/search.feature
-examples/watir/features/steps/stories_steps.rb
+examples/watir/features/step_definitons/stories_steps.rb
features/see_features.feature
features/steps/features_steps.rb
gem_tasks/deployment.rake
@@ -71,28 +114,31 @@ gem_tasks/flog.rake
gem_tasks/gemspec.rake
gem_tasks/rspec.rake
gem_tasks/treetop.rake
-generators/cucumber/cucumber_generator.rb
-generators/cucumber/templates/common_webrat.rb
-generators/cucumber/templates/cucumber
-generators/cucumber/templates/cucumber.rake
-generators/cucumber/templates/env.rb
-generators/feature/feature_generator.rb
-generators/feature/templates/feature.erb
-generators/feature/templates/steps.erb
+lib/autotest/cucumber.rb
+lib/autotest/cucumber_mixin.rb
+lib/autotest/cucumber_rails.rb
+lib/autotest/cucumber_rails_rspec.rb
+lib/autotest/cucumber_rspec.rb
+lib/autotest/discover.rb
lib/cucumber.rb
+lib/cucumber/broadcaster.rb
lib/cucumber/cli.rb
lib/cucumber/core_ext/proc.rb
lib/cucumber/core_ext/string.rb
lib/cucumber/executor.rb
lib/cucumber/formatters.rb
lib/cucumber/formatters/ansicolor.rb
+lib/cucumber/formatters/autotest_formatter.rb
lib/cucumber/formatters/cucumber.css
lib/cucumber/formatters/cucumber.js
lib/cucumber/formatters/html_formatter.rb
lib/cucumber/formatters/jquery.js
lib/cucumber/formatters/pretty_formatter.rb
+lib/cucumber/formatters/profile_formatter.rb
lib/cucumber/formatters/progress_formatter.rb
lib/cucumber/languages.yml
+lib/cucumber/model.rb
+lib/cucumber/model/table.rb
lib/cucumber/rails/rspec.rb
lib/cucumber/rails/world.rb
lib/cucumber/rake/task.rb
@@ -107,18 +153,39 @@ lib/cucumber/tree/step.rb
lib/cucumber/tree/table.rb
lib/cucumber/tree/top_down_visitor.rb
lib/cucumber/treetop_parser/feature.treetop.erb
+lib/cucumber/treetop_parser/feature_ar.rb
+lib/cucumber/treetop_parser/feature_cy.rb
lib/cucumber/treetop_parser/feature_da.rb
lib/cucumber/treetop_parser/feature_de.rb
+lib/cucumber/treetop_parser/feature_en-tx.rb
lib/cucumber/treetop_parser/feature_en.rb
lib/cucumber/treetop_parser/feature_es.rb
lib/cucumber/treetop_parser/feature_et.rb
lib/cucumber/treetop_parser/feature_fr.rb
+lib/cucumber/treetop_parser/feature_id.rb
+lib/cucumber/treetop_parser/feature_it.rb
+lib/cucumber/treetop_parser/feature_ja.rb
+lib/cucumber/treetop_parser/feature_nl.rb
lib/cucumber/treetop_parser/feature_no.rb
lib/cucumber/treetop_parser/feature_parser.rb
+lib/cucumber/treetop_parser/feature_pl.rb
lib/cucumber/treetop_parser/feature_pt.rb
+lib/cucumber/treetop_parser/feature_ro.rb
+lib/cucumber/treetop_parser/feature_ro2.rb
lib/cucumber/treetop_parser/feature_ru.rb
lib/cucumber/treetop_parser/feature_se.rb
+lib/cucumber/treetop_parser/feature_zh-CN.rb
lib/cucumber/version.rb
+rails_generators/cucumber/USAGE
+rails_generators/cucumber/cucumber_generator.rb
+rails_generators/cucumber/templates/cucumber
+rails_generators/cucumber/templates/cucumber.rake
+rails_generators/cucumber/templates/env.rb
+rails_generators/cucumber/templates/webrat_steps.rb
+rails_generators/feature/USAGE
+rails_generators/feature/feature_generator.rb
+rails_generators/feature/templates/feature.erb
+rails_generators/feature/templates/steps.erb
script/console
script/console.cmd
script/destroy
@@ -128,17 +195,26 @@ script/generate.cmd
script/txt2html
script/txt2html.cmd
setup.rb
+spec/cucumber/broadcaster_spec.rb
spec/cucumber/cli_spec.rb
spec/cucumber/core_ext/proc_spec.rb
spec/cucumber/core_ext/string_spec.rb
spec/cucumber/executor_spec.rb
spec/cucumber/formatters/ansicolor_spec.rb
+spec/cucumber/formatters/autotest_formatter_spec.rb
spec/cucumber/formatters/features.html
spec/cucumber/formatters/html_formatter_spec.rb
spec/cucumber/formatters/pretty_formatter_spec.rb
+spec/cucumber/formatters/profile_formatter_spec.rb
spec/cucumber/formatters/progress_formatter_spec.rb
+spec/cucumber/model/table_spec.rb
+spec/cucumber/rails/stubs/mini_rails.rb
+spec/cucumber/rails/stubs/test_help.rb
+spec/cucumber/rails/world_spec.rb
spec/cucumber/sell_cucumbers.feature
spec/cucumber/step_mother_spec.rb
+spec/cucumber/tree/feature_spec.rb
+spec/cucumber/tree/row_scenario_spec.rb
spec/cucumber/tree/scenario_spec.rb
spec/cucumber/tree/step_spec.rb
spec/cucumber/treetop_parser/empty_feature.feature
@@ -146,8 +222,10 @@ spec/cucumber/treetop_parser/empty_scenario.feature
spec/cucumber/treetop_parser/feature_parser_spec.rb
spec/cucumber/treetop_parser/fit_scenario.feature
spec/cucumber/treetop_parser/given_scenario.feature
+spec/cucumber/treetop_parser/multiline_steps.feature
spec/cucumber/treetop_parser/multiple_tables.feature
spec/cucumber/treetop_parser/spaces.feature
+spec/cucumber/treetop_parser/test_dos.feature
spec/cucumber/treetop_parser/with_comments.feature
spec/spec.opts
spec/spec_helper.rb
View
3  README.txt
@@ -13,8 +13,7 @@ Documentation: http://github.com/aslakhellesoy/cucumber/wikis/home
== INSTALL:
-* gem sources --add http://gems.github.com/
-* gem install aslakhellesoy-cucumber
+* gem install cucumber
== LICENSE:
View
7 Rakefile
@@ -1,4 +1,9 @@
+ENV['NODOT'] = 'true' # We don't want class diagrams in RDoc
require 'config/requirements'
require 'config/hoe' # setup Hoe + all gem configuration
-Dir['gem_tasks/**/*.rake'].each { |rake| load rake }
+Dir['gem_tasks/**/*.rake'].each { |rake| load rake }
+
+# Hoe gives us :default => :test, but we don't have Test::Unit tests.
+Rake::Task[:default].clear_prerequisites
+task :default => [:spec, :features]
View
1  bin/cucumber
@@ -8,5 +8,6 @@ if Config::CONFIG['sitedir'] =~ /IronRuby/
end
# Add .rb to work around an IronRuby bug
$:.unshift(File.dirname(__FILE__ + '.rb') + '/../lib') unless $:.include?(File.dirname(__FILE__ + '.rb') + '/../lib')
+
require 'cucumber/cli'
Cucumber::CLI.execute
View
46 cucumber.gemspec
@@ -0,0 +1,46 @@
+Gem::Specification.new do |s|
+ s.name = %q{cucumber}
+ s.version = "0.1.10"
+
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
+ s.authors = ["Aslak Helles\303\270y"]
+ s.date = %q{2008-11-12}
+ s.default_executable = %q{cucumber}
+ s.description = %q{Executable Feature scenarios}
+ s.email = ["aslak.hellesoy@gmail.com"]
+ s.executables = ["cucumber"]
+ s.extra_rdoc_files = ["History.txt", "License.txt", "Manifest.txt", "README.txt", "TODO.txt", "examples/i18n/ja/README.txt"]
+ s.files = ["History.txt", "License.txt", "Manifest.txt", "README.txt", "Rakefile", "TODO.txt", "bin/cucumber", "config/hoe.rb", "config/requirements.rb", "cucumber.yml", "examples/calculator_ruby_features/Rakefile", "examples/calculator_ruby_features/features/addition.rb", "examples/calculator_ruby_features/features/step_definitons/calculator_steps.rb", "examples/cs/README.textile", "examples/cs/Rakefile", "examples/cs/features/hello.feature", "examples/cs/features/step_definitons/hello_steps.rb", "examples/cs/features/step_definitons/tree_steps.rb", "examples/cs/features/tree.feature", "examples/cs/src/Hello.cs", "examples/dos_line_endings/Rakefile", "examples/dos_line_endings/features/dos_line_endings.feature", "examples/i18n/README.textile", "examples/i18n/Rakefile", "examples/i18n/ar/Rakefile", "examples/i18n/ar/features/addition.feature", "examples/i18n/ar/features/step_definitons/calculator_steps.rb", "examples/i18n/ar/lib/calculator.rb", "examples/i18n/da/Rakefile", "examples/i18n/da/features/step_definitons/kalkulator_steps.rb", "examples/i18n/da/features/summering.feature", "examples/i18n/da/lib/kalkulator.rb", "examples/i18n/en/Rakefile", "examples/i18n/en/features/addition.feature", "examples/i18n/en/features/division.feature", "examples/i18n/en/features/step_definitons/calculator_steps.rb", "examples/i18n/en/lib/calculator.rb", "examples/i18n/es/Rakefile", "examples/i18n/es/features/adicion.feature", "examples/i18n/es/features/step_definitons/calculador_steps.rb", "examples/i18n/es/lib/calculador.rb", "examples/i18n/et/Rakefile", "examples/i18n/et/features/liitmine.feature", "examples/i18n/et/features/step_definitions/kalkulaator_steps.rb", "examples/i18n/et/lib/kalkulaator.rb", "examples/i18n/fr/Rakefile", "examples/i18n/fr/features/addition.feature", "examples/i18n/fr/features/step_definitions/calculatrice_steps.rb", "examples/i18n/fr/lib/calculatrice.rb", "examples/i18n/id/Rakefile", "examples/i18n/id/features/addition.feature", "examples/i18n/id/features/division.feature", "examples/i18n/id/features/step_definitons/calculator_steps.rb", "examples/i18n/id/lib/calculator.rb", "examples/i18n/it/Rakefile", "examples/i18n/it/features/somma.feature", "examples/i18n/it/features/step_definitons/calcolatrice_steps.rb", "examples/i18n/it/lib/calcolatrice.rb", "examples/i18n/ja/README.txt", "examples/i18n/ja/Rakefile", "examples/i18n/ja/features/addition.feature", "examples/i18n/ja/features/division.feature", "examples/i18n/ja/features/step_definitons/calculator_steps.rb", "examples/i18n/ja/lib/calculator.rb", "examples/i18n/no/Rakefile", "examples/i18n/no/features/step_definitons/kalkulator_steps.rb", "examples/i18n/no/features/summering.feature", "examples/i18n/no/lib/kalkulator.rb", "examples/i18n/pt/Rakefile", "examples/i18n/pt/features/adicao.feature", "examples/i18n/pt/features/step_definitions/calculadora_steps.rb", "examples/i18n/pt/lib/calculadora.rb", "examples/i18n/ro/Rakefile", "examples/i18n/ro/features/step_definitons/calculator_steps.rb", "examples/i18n/ro/features/suma.feature", "examples/i18n/ro/lib/calculator.rb", "examples/i18n/se/Rakefile", "examples/i18n/se/features/step_definitons/kalkulator_steps.rb", "examples/i18n/se/features/summering.feature", "examples/i18n/se/lib/kalkulator.rb", "examples/i18n/zh-CN/Rakefile", "examples/i18n/zh-CN/features/addition.feature", "examples/i18n/zh-CN/features/step_definitons/calculator_steps.rb", "examples/i18n/zh-CN/lib/calculator.rb", "examples/java/README.textile", "examples/java/Rakefile", "examples/java/features/hello.feature", "examples/java/features/step_definitons/hello_steps.rb", "examples/java/features/step_definitons/tree_steps.rb", "examples/java/features/tree.feature", "examples/java/src/cucumber/demo/Hello.java", "examples/selenium/Rakefile", "examples/selenium/features/search.feature", "examples/selenium/features/step_definitons/stories_steps.rb", "examples/tickets/Rakefile", "examples/tickets/cucumber.yml", "examples/tickets/features/step_definitons/tickets_steps.rb", "examples/tickets/features/tickets.feature", "examples/watir/Rakefile", "examples/watir/features/search.feature", "examples/watir/features/step_definitons/stories_steps.rb", "features/see_features.feature", "features/steps/features_steps.rb", "gem_tasks/deployment.rake", "gem_tasks/environment.rake", "gem_tasks/features.rake", "gem_tasks/fix_cr_lf.rake", "gem_tasks/flog.rake", "gem_tasks/gemspec.rake", "gem_tasks/rspec.rake", "gem_tasks/treetop.rake", "lib/autotest/cucumber.rb", "lib/autotest/cucumber_mixin.rb", "lib/autotest/cucumber_rails.rb", "lib/autotest/cucumber_rails_rspec.rb", "lib/autotest/cucumber_rspec.rb", "lib/autotest/discover.rb", "lib/cucumber.rb", "lib/cucumber/broadcaster.rb", "lib/cucumber/cli.rb", "lib/cucumber/core_ext/proc.rb", "lib/cucumber/core_ext/string.rb", "lib/cucumber/executor.rb", "lib/cucumber/formatters.rb", "lib/cucumber/formatters/ansicolor.rb", "lib/cucumber/formatters/autotest_formatter.rb", "lib/cucumber/formatters/cucumber.css", "lib/cucumber/formatters/cucumber.js", "lib/cucumber/formatters/html_formatter.rb", "lib/cucumber/formatters/jquery.js", "lib/cucumber/formatters/pretty_formatter.rb", "lib/cucumber/formatters/profile_formatter.rb", "lib/cucumber/formatters/progress_formatter.rb", "lib/cucumber/languages.yml", "lib/cucumber/model.rb", "lib/cucumber/model/table.rb", "lib/cucumber/rails/rspec.rb", "lib/cucumber/rails/world.rb", "lib/cucumber/rake/task.rb", "lib/cucumber/step_methods.rb", "lib/cucumber/step_mother.rb", "lib/cucumber/tree.rb", "lib/cucumber/tree/feature.rb", "lib/cucumber/tree/features.rb", "lib/cucumber/tree/given_scenario.rb", "lib/cucumber/tree/scenario.rb", "lib/cucumber/tree/step.rb", "lib/cucumber/tree/table.rb", "lib/cucumber/tree/top_down_visitor.rb", "lib/cucumber/treetop_parser/feature.treetop.erb", "lib/cucumber/treetop_parser/feature_ar.rb", "lib/cucumber/treetop_parser/feature_cy.rb", "lib/cucumber/treetop_parser/feature_da.rb", "lib/cucumber/treetop_parser/feature_de.rb", "lib/cucumber/treetop_parser/feature_en-tx.rb", "lib/cucumber/treetop_parser/feature_en.rb", "lib/cucumber/treetop_parser/feature_es.rb", "lib/cucumber/treetop_parser/feature_et.rb", "lib/cucumber/treetop_parser/feature_fr.rb", "lib/cucumber/treetop_parser/feature_id.rb", "lib/cucumber/treetop_parser/feature_it.rb", "lib/cucumber/treetop_parser/feature_ja.rb", "lib/cucumber/treetop_parser/feature_nl.rb", "lib/cucumber/treetop_parser/feature_no.rb", "lib/cucumber/treetop_parser/feature_parser.rb", "lib/cucumber/treetop_parser/feature_pl.rb", "lib/cucumber/treetop_parser/feature_pt.rb", "lib/cucumber/treetop_parser/feature_ro.rb", "lib/cucumber/treetop_parser/feature_ro2.rb", "lib/cucumber/treetop_parser/feature_ru.rb", "lib/cucumber/treetop_parser/feature_se.rb", "lib/cucumber/treetop_parser/feature_zh-CN.rb", "lib/cucumber/version.rb", "rails_generators/cucumber/USAGE", "rails_generators/cucumber/cucumber_generator.rb", "rails_generators/cucumber/templates/cucumber", "rails_generators/cucumber/templates/cucumber.rake", "rails_generators/cucumber/templates/env.rb", "rails_generators/cucumber/templates/webrat_steps.rb", "rails_generators/feature/USAGE", "rails_generators/feature/feature_generator.rb", "rails_generators/feature/templates/feature.erb", "rails_generators/feature/templates/steps.erb", "script/console", "script/console.cmd", "script/destroy", "script/destroy.cmd", "script/generate", "script/generate.cmd", "script/txt2html", "script/txt2html.cmd", "setup.rb", "spec/cucumber/broadcaster_spec.rb", "spec/cucumber/cli_spec.rb", "spec/cucumber/core_ext/proc_spec.rb", "spec/cucumber/core_ext/string_spec.rb", "spec/cucumber/executor_spec.rb", "spec/cucumber/formatters/ansicolor_spec.rb", "spec/cucumber/formatters/autotest_formatter_spec.rb", "spec/cucumber/formatters/features.html", "spec/cucumber/formatters/html_formatter_spec.rb", "spec/cucumber/formatters/pretty_formatter_spec.rb", "spec/cucumber/formatters/profile_formatter_spec.rb", "spec/cucumber/formatters/progress_formatter_spec.rb", "spec/cucumber/model/table_spec.rb", "spec/cucumber/rails/stubs/mini_rails.rb", "spec/cucumber/rails/stubs/test_help.rb", "spec/cucumber/rails/world_spec.rb", "spec/cucumber/sell_cucumbers.feature", "spec/cucumber/step_mother_spec.rb", "spec/cucumber/tree/feature_spec.rb", "spec/cucumber/tree/row_scenario_spec.rb", "spec/cucumber/tree/scenario_spec.rb", "spec/cucumber/tree/step_spec.rb", "spec/cucumber/treetop_parser/empty_feature.feature", "spec/cucumber/treetop_parser/empty_scenario.feature", "spec/cucumber/treetop_parser/feature_parser_spec.rb", "spec/cucumber/treetop_parser/fit_scenario.feature", "spec/cucumber/treetop_parser/given_scenario.feature", "spec/cucumber/treetop_parser/multiline_steps.feature", "spec/cucumber/treetop_parser/multiple_tables.feature", "spec/cucumber/treetop_parser/spaces.feature", "spec/cucumber/treetop_parser/test_dos.feature", "spec/cucumber/treetop_parser/with_comments.feature", "spec/spec.opts", "spec/spec_helper.rb"]
+ s.has_rdoc = true
+ s.homepage = %q{http://github.com/aslakhellesoy/cucumber}
+ s.rdoc_options = ["--main", "README.txt"]
+ s.require_paths = ["lib"]
+ s.rubyforge_project = %q{rspec}
+ s.rubygems_version = %q{1.2.0}
+ s.summary = %q{Executable Feature scenarios}
+
+ if s.respond_to? :specification_version then
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
+ s.specification_version = 2
+
+ if current_version >= 3 then
+ s.add_runtime_dependency(%q<term-ansicolor>, [">= 1.0.3"])
+ s.add_runtime_dependency(%q<treetop>, [">= 1.2.4"])
+ s.add_runtime_dependency(%q<rspec>, [">= 1.1.5"])
+ s.add_runtime_dependency(%q<diff-lcs>, [">= 1.1.2"])
+ s.add_development_dependency(%q<hoe>, [">= 1.8.2"])
+ else
+ s.add_dependency(%q<term-ansicolor>, [">= 1.0.3"])
+ s.add_dependency(%q<treetop>, [">= 1.2.4"])
+ s.add_dependency(%q<rspec>, [">= 1.1.5"])
+ s.add_dependency(%q<diff-lcs>, [">= 1.1.2"])
+ s.add_dependency(%q<hoe>, [">= 1.8.2"])
+ end
+ else
+ s.add_dependency(%q<term-ansicolor>, [">= 1.0.3"])
+ s.add_dependency(%q<treetop>, [">= 1.2.4"])
+ s.add_dependency(%q<rspec>, [">= 1.1.5"])
+ s.add_dependency(%q<diff-lcs>, [">= 1.1.2"])
+ s.add_dependency(%q<hoe>, [">= 1.8.2"])
+ end
+end
View
2  cucumber.yml
@@ -1 +1 @@
-rest: --format progress features
+default: --format progress features
View
6 examples/calculator/Rakefile
@@ -1,6 +0,0 @@
-$:.unshift(File.dirname(__FILE__) + '/../../lib')
-require 'cucumber/rake/task'
-
-Cucumber::Rake::Task.new do |t|
- t.cucumber_opts = "--profile default"
-end
View
1  examples/calculator/cucumber.yml
@@ -1 +0,0 @@
-default: --format pretty --source features
View
2  examples/calculator_ruby_features/features/addition.rb
@@ -10,7 +10,7 @@
And "I have entered 70 into the calculator"
When "I add"
Then "the result should be 120 on the screen"
- And "the result class should be Float"
+ And "the result class should be Fixnum"
end
Table do |t|
View
0  ..._ruby_features/features/steps/calculator_steps.rb → ...ures/features/step_definitons/calculator_steps.rb
File renamed without changes
View
6 examples/calculatrice_francaise_avec_soit_scenario/Rakefile
@@ -1,6 +0,0 @@
-$:.unshift(File.dirname(__FILE__) + '/../../lib')
-require 'cucumber/rake/task'
-
-Cucumber::Rake::Task.new do |t|
- t.cucumber_opts = "--format pretty --language fr"
-end
View
0  examples/cs/features/steps/hello_steps.rb → examples/cs/features/step_definitons/hello_steps.rb
File renamed without changes
View
0  examples/cs/features/steps/tree_steps.rb → examples/cs/features/step_definitons/tree_steps.rb
File renamed without changes
View
6 examples/danish_calculator/Rakefile
@@ -1,6 +0,0 @@
-$:.unshift(File.dirname(__FILE__) + '/../../lib')
-require 'cucumber/rake/task'
-
-Cucumber::Rake::Task.new do |t|
- t.cucumber_opts = "--format pretty --language da"
-end
View
6 examples/estonian_calculator/Rakefile
@@ -1,6 +0,0 @@
-$:.unshift(File.dirname(__FILE__) + '/../../lib')
-require 'cucumber/rake/task'
-
-Cucumber::Rake::Task.new do |t|
- t.cucumber_opts = "--format pretty --language et"
-end
View
16 examples/estonian_calculator/features/liitmine.feature
@@ -1,16 +0,0 @@
-Omadus: Liitmine
- Selleks et vältida rumalaid vigu
- Olles matemaatika-puupea
- Tahan et mulle öeldaks kahe numbri summa
-
- Stsenaarium: Liida kaks numbrit
- Eeldades et olen sisestanud kalkulaatorisse numbri 50
- Ja olen sisestanud kalkulaatorisse numbri 70
- Kui ma vajutan liida
- Siis vastuseks peab ekraanil kuvatama 120
- Ja vastuseklass peab olema tüüpi Fixnum
-
- | input_1 | input_2 | button | output | class |
- | 20 | 30 | liida | 50 | Fixnum |
- | 2 | 5 | liida | 7 | Fixnum |
- | 0 | 40 | liida | 40 | Fixnum |
View
18 examples/i18n/README.textile
@@ -0,0 +1,18 @@
+h1. Internationalisation (i18n) examples
+
+Under this directory you'll find examples of Cucumber features written in
+many of the natural languages Cucumber supports.
+
+For a full list of what languages Cucumber supports - run <pre>cucumber --help</pre>
+
+h2. Running all the examples
+
+Open a shell in this directory and run
+
+<pre>rake i18n</pre>
+
+h2. Running examples for a specific language
+
+Open a shell in the directory for the specific language and run
+
+<pre>rake features</pre>
View
16 examples/i18n/Rakefile
@@ -0,0 +1,16 @@
+desc 'Run features for all languages'
+task :i18n do
+ dir = File.dirname(__FILE__)
+ Dir["#{dir}/*"].each do |f|
+ if File.directory?(f)
+ lang = f[dir.length+1..-1]
+ Dir.chdir(f) do
+ rake("features")
+ end
+ end
+ end
+end
+
+def rake(args)
+ ruby(File.join(Gem.bindir, 'rake'), args)
+end
View
6 examples/i18n/ar/Rakefile
@@ -0,0 +1,6 @@
+$:.unshift(File.dirname(__FILE__) + '/../../../lib')
+require 'cucumber/rake/task'
+
+Cucumber::Rake::Task.new do |t|
+ t.cucumber_opts = "--language ar"
+end
View
17 examples/i18n/ar/features/addition.feature
@@ -0,0 +1,17 @@
+خاصية: الجمع
+ من اجل تجنب الأخطاء السخيفة
+ كشخص غبي في الرياضيات
+ اريد معرفة ناتج جمع عددين
+
+ سيناريو: جمع عددين
+ بفرض كتابة ٥٠ في الآلة الحاسبة
+ و كتابة ٧٠ في الآلة الحاسبة
+ متى يتم الضغط على جمع
+ اذاً يظهر ١٢ على الشاشة
+ و الناتج يجب ان يكون Fixnum
+
+ امثلة اكثر:
+ | input_1 | input_2 | button | output | class |
+ | 20 | 30 | جمع | 50 | Fixnum |
+ | 2 | 5 | جمع | 7 | Fixnum |
+ | 0 | 40 | جمع | 40 | Fixnum |
View
31 examples/i18n/ar/features/step_definitons/calculator_steps.rb
@@ -0,0 +1,31 @@
+require 'spec'
+$:.unshift(File.dirname(__FILE__) + '/../../lib')
+require 'calculator'
+
+Before do
+ @calc = Calculator.new
+end
+
+After do
+end
+
+Given "كتابة $n في الآلة الحاسبة" do |n|
+ @calc.push n.to_i
+end
+
+When /يتم الضغط على (\w+)/ do |op|
+ @result = @calc.send op
+end
+
+Then /يظهر (.*) على الشاشة/ do |result|
+ @result.should == result.to_f
+end
+
+Then /يجب ان يكون (\w*)/ do |class_name|
+ @result.class.name.should == class_name
+end
+
+Given /it should rain on (\w+)/ do |day|
+ @calc.rain?(day).should == true
+end
+
View
10 examples/i18n/ar/lib/calculator.rb
@@ -0,0 +1,10 @@
+class Calculator
+ def push(n)
+ @args ||= []
+ @args << n
+ end
+
+ def جمع
+ @args.inject(0){|n,sum| sum+=n}
+ end
+end
View
6 examples/i18n/da/Rakefile
@@ -0,0 +1,6 @@
+$:.unshift(File.dirname(__FILE__) + '/../../../lib')
+require 'cucumber/rake/task'
+
+Cucumber::Rake::Task.new do |t|
+ t.cucumber_opts = "--language da"
+end
View
0  ...ish_calculator/features/steps/kalkulator_steps.rb → ...n/da/features/step_definitons/kalkulator_steps.rb
File renamed without changes
View
2  ...ples/danish_calculator/features/summering.feature → examples/i18n/da/features/summering.feature
@@ -14,4 +14,4 @@ Egenskab: Summering
Og at jeg har indtastet 7
Og at jeg har indtastet 1
Når jeg summerer
- skal resultatet være 14
+ skal resultatet være 13
View
0  examples/norwegian_calculator/lib/kalkulator.rb → examples/i18n/da/lib/kalkulator.rb
File renamed without changes
View
1  examples/i18n/de/.gitignore
@@ -0,0 +1 @@
+features.html
View
6 examples/i18n/de/Rakefile
@@ -0,0 +1,6 @@
+$:.unshift(File.dirname(__FILE__) + '/../../../lib')
+require 'cucumber/rake/task'
+
+Cucumber::Rake::Task.new do |t|
+ t.cucumber_opts = "--language de"
+end
View
17 examples/i18n/de/features/addition.feature
@@ -0,0 +1,17 @@
+Funktionalität: Addition
+ Um dumme Fehler zu vermeiden
+ möchte ich als Matheidiot
+ die Summe zweier Zahlen gesagt bekommen
+
+ Szenario: Zwei Zahlen hinzufügen
+ Gegeben sei ich habe 50 in den Taschenrechner eingegeben
+ Und ich habe 70 in den Taschenrechner eingegeben
+ Wenn ich add drücke
+ Dann sollte das Ergebniss auf dem Bildschirm 120 sein
+ Und die Ergebnissklasse sollte eine Fixnum sein
+
+ Mehr Beispiele:
+ | Eingabe_1 | Eingabe_2 | Knopf | Ausgabe | Klasse |
+ | 20 | 30 | add | 50 | Fixnum |
+ | 2 | 5 | add | 7 | Fixnum |
+ | 0 | 40 | add | 40 | Fixnum |
View
10 examples/i18n/de/features/division.feature
@@ -0,0 +1,10 @@
+Funktionalität: Division
+ Um dumme Fehler zu vermeiden
+ müssen Kassierer in der Lage sein einen Bruchteil zu berechnen
+
+ Szenario: Normale Zahlen
+ Gegeben sei ich habe 3 in den Taschenrechner eingegeben
+ Und ich habe 2 in den Taschenrechner eingegeben
+ Wenn ich divide drücke
+ Dann sollte das Ergebniss auf dem Bildschirm 1.5 sein
+ Und die Ergebnissklasse sollte eine Float sein
View
30 examples/i18n/de/features/step_definitons/calculator_steps.rb
@@ -0,0 +1,30 @@
+require 'spec'
+$:.unshift(File.dirname(__FILE__) + '/../../lib')
+require 'calculator'
+
+Before do
+ @calc = Calculator.new
+end
+
+After do
+end
+
+Given "ich habe $n in den Taschenrechner eingegeben" do |n|
+ @calc.push n.to_i
+end
+
+When /ich (\w+) drücke/ do |op|
+ @result = @calc.send op
+end
+
+Then /sollte das Ergebniss auf dem Bildschirm (.*) sein/ do |result|
+ @result.should == result.to_f
+end
+
+Then /die Ergebnissklasse sollte eine (\w*) sein/ do |class_name|
+ @result.class.name.should == class_name
+end
+
+Given /it should rain on (\w+)/ do |day|
+ @calc.rain?(day).should == true
+end
View
2  examples/calculator/lib/calculator.rb → examples/i18n/de/lib/calculator.rb
@@ -1,7 +1,5 @@
class Calculator
def push(n)
- n += 2 if n == 0 # a really stupid bug
-
@args ||= []
@args << n
end
View
1  examples/i18n/en/.gitignore
@@ -0,0 +1 @@
+features.html
View
6 examples/i18n/en/Rakefile
@@ -0,0 +1,6 @@
+$:.unshift(File.dirname(__FILE__) + '/../../../lib')
+require 'cucumber/rake/task'
+
+Cucumber::Rake::Task.new do |t|
+ t.cucumber_opts = "--language en"
+end
View
1  examples/calculator/features/addition.feature → examples/i18n/en/features/addition.feature
@@ -10,6 +10,7 @@ Feature: Addition
Then the result should be 120 on the screen
And the result class should be Fixnum
+ More Examples:
| input_1 | input_2 | button | output | class |
| 20 | 30 | add | 50 | Fixnum |
| 2 | 5 | add | 7 | Fixnum |
View
0  examples/calculator/features/division.feature → examples/i18n/en/features/division.feature
File renamed without changes
View
0  ...les/calculator/features/steps/calculator_steps.rb → ...n/en/features/step_definitons/calculator_steps.rb
File renamed without changes
View
14 examples/i18n/en/lib/calculator.rb
@@ -0,0 +1,14 @@
+class Calculator
+ def push(n)
+ @args ||= []
+ @args << n
+ end
+
+ def add
+ @args.inject(0){|n,sum| sum+=n}
+ end
+
+ def divide
+ @args[0].to_f / @args[1].to_f
+ end
+end
View
6 examples/i18n/es/Rakefile
@@ -0,0 +1,6 @@
+$:.unshift(File.dirname(__FILE__) + '/../../../lib')
+require 'cucumber/rake/task'
+
+Cucumber::Rake::Task.new do |t|
+ t.cucumber_opts = "--language es"
+end
View
2  examples/spanish_calculator/features/adicion.feature → examples/i18n/es/features/adicion.feature
@@ -14,4 +14,4 @@ Característica: adición
Y he introducido 7
Y he introducido 1
Cuando añado
- Entonces el resultado debe ser 14
+ Entonces el resultado debe ser 13
View
0  ...ish_calculator/features/steps/calculador_steps.rb → ...n/es/features/step_definitons/calculador_steps.rb
File renamed without changes
View
0  examples/spanish_calculator/lib/Calculador.rb → examples/i18n/es/lib/calculador.rb
File renamed without changes
View
6 examples/i18n/et/Rakefile
@@ -0,0 +1,6 @@
+$:.unshift(File.dirname(__FILE__) + '/../../../lib')
+require 'cucumber/rake/task'
+
+Cucumber::Rake::Task.new do |t|
+ t.cucumber_opts = "--language et"
+end
View
17 examples/i18n/et/features/liitmine.feature
@@ -0,0 +1,17 @@
+Omadus: Liitmine
+ Selleks et vältida rumalaid vigu
+ Olles matemaatika-puupea
+ Tahan et mulle öeldaks kahe numbri summa
+
+ Stsenaarium: Liida kaks numbrit
+ Eeldades et olen sisestanud kalkulaatorisse numbri 50
+ Ja olen sisestanud kalkulaatorisse numbri 70
+ Kui ma vajutan liida
+ Siis vastuseks peab ekraanil kuvatama 120
+ Ja vastuseklass peab olema tüüpi Fixnum
+
+ More Examples:
+ | input_1 | input_2 | button | output | class |
+ | 20 | 30 | liida | 50 | Fixnum |
+ | 2 | 5 | liida | 7 | Fixnum |
+ | 0 | 40 | liida | 40 | Fixnum |
View
13 ...estonian_calculator/features/kalkulaator_steps.rb → ...et/features/step_definitions/kalkulaator_steps.rb
@@ -1,15 +1,6 @@
require 'spec'
-
-class Kalkulaator
- def push(n)
- @args ||= []
- @args << n
- end
-
- def liida
- @args.inject(0) {|n,sum| sum+n}
- end
-end
+$:.unshift(File.dirname(__FILE__) + '/../../lib')
+require 'kalkulaator'
Before do
@calc = Kalkulaator.new
View
10 examples/i18n/et/lib/kalkulaator.rb
@@ -0,0 +1,10 @@
+class Kalkulaator
+ def push(n)
+ @args ||= []
+ @args << n
+ end
+
+ def liida
+ @args.inject(0) {|n,sum| sum+n}
+ end
+end
View
6 examples/i18n/fr/Rakefile
@@ -0,0 +1,6 @@
+$:.unshift(File.dirname(__FILE__) + '/../../../lib')
+require 'cucumber/rake/task'
+
+Cucumber::Rake::Task.new do |t|
+ t.cucumber_opts = "--language fr"
+end
View
0  ...aise_avec_soit_scenario/features/addition.feature → examples/i18n/fr/features/addition.feature
File renamed without changes
View
13 ...avec_soit_scenario/features/calculatrice_steps.rb → ...r/features/step_definitions/calculatrice_steps.rb
@@ -1,15 +1,6 @@
require 'spec'
-
-class Calulatrice
- def push(n)
- @args ||= []
- @args << n
- end
-
- def additionner
- @args.inject(0){|n,sum| sum+=n}
- end
-end
+$:.unshift(File.dirname(__FILE__) + '/../../lib')
+require 'calculatrice'
Before do
@calc = Calulatrice.new
View
10 examples/i18n/fr/lib/calculatrice.rb
@@ -0,0 +1,10 @@
+class Calulatrice
+ def push(n)
+ @args ||= []
+ @args << n
+ end
+
+ def additionner
+ @args.inject(0){|n,sum| sum+=n}
+ end
+end
View
1  examples/i18n/id/.gitignore
@@ -0,0 +1 @@
+features.html
View
6 examples/i18n/id/Rakefile
@@ -0,0 +1,6 @@
+$:.unshift(File.dirname(__FILE__) + '/../../../lib')
+require 'cucumber/rake/task'
+
+Cucumber::Rake::Task.new do |t|
+ t.cucumber_opts = "--language id"
+end
View
17 examples/i18n/id/features/addition.feature
@@ -0,0 +1,17 @@
+Fitur: Addition
+ Untuk menghindari kesalahan konyol
+ Sebagai orang yang gak bisa matematika
+ Aku ingin diberi tahu jumlah dua bilangan
+
+ Skenario: Menjumlahkan dua bilangan
+ Dengan aku sudah masukkan 50 ke kalkulator
+ Dan aku sudah masukkan 70 ke kalkulator
+ Ketika aku tekan add
+ Maka hasilnya harus 120 di layar
+ Dan class hasilnya harus Fixnum
+
+ Contoh Tambahan:
+ | input_1 | input_2 | button | output | class |
+ | 20 | 30 | add | 50 | Fixnum |
+ | 2 | 5 | add | 7 | Fixnum |
+ | 0 | 40 | add | 40 | Fixnum |
View
10 examples/i18n/id/features/division.feature
@@ -0,0 +1,10 @@
+Fitur: Division
+ Untuk hindari kesalahan konyol
+ Kasir harus dapat menghitung pembagian
+
+ Skenario: bilangan biasa
+ Dengan aku sudah masukkan 3 ke kalkulator
+ Dan aku sudah masukkan 2 ke kalkulator
+ Ketika aku tekan divide
+ Maka hasilnya harus 1.5 di layar
+ Dan class hasilnya harus Float
View
31 examples/i18n/id/features/step_definitons/calculator_steps.rb
@@ -0,0 +1,31 @@
+require 'spec'
+$:.unshift(File.dirname(__FILE__) + '/../../lib')
+require 'calculator'
+
+Before do
+ @calc = Calculator.new
+end
+
+After do
+end
+
+Given "aku sudah masukkan $n ke kalkulator" do |n|
+ @calc.push n.to_i
+end
+
+When /aku tekan (\w+)/ do |op|
+ @result = @calc.send op
+end
+
+Then /hasilnya harus (.*) di layar/ do |result|
+ @result.should == result.to_f
+end
+
+Then /class hasilnya harus (\w*)/ do |class_name|
+ @result.class.name.should == class_name
+end
+
+Given /it should rain on (\w+)/ do |day|
+ @calc.rain?(day).should == true
+end
+
View
14 examples/i18n/id/lib/calculator.rb
@@ -0,0 +1,14 @@
+class Calculator
+ def push(n)
+ @args ||= []
+ @args << n
+ end
+
+ def add
+ @args.inject(0){|n,sum| sum+=n}
+ end
+
+ def divide
+ @args[0].to_f / @args[1].to_f
+ end
+end
View
6 examples/i18n/it/Rakefile
@@ -0,0 +1,6 @@
+$:.unshift(File.dirname(__FILE__) + '/../../../lib')
+require 'cucumber/rake/task'
+
+Cucumber::Rake::Task.new do |t|
+ t.cucumber_opts = "--language it"
+end
View
10 examples/i18n/it/features/somma.feature
@@ -0,0 +1,10 @@
+Funzionalità: somma
+ Per evitare di fare errori stupidi
+ Come utente
+ Voglio sapere la somma di due numeri
+
+ Scenario: la somma di due numeri
+ Dato che ho inserito 5
+ E che ho inserito 7
+ Quando premo somma
+ Allora il risultato deve essere 12
View
22 examples/i18n/it/features/step_definitons/calcolatrice_steps.rb
@@ -0,0 +1,22 @@
+require 'spec'
+$:.unshift(File.dirname(__FILE__) + '/../../lib')
+require 'calcolatrice'
+
+Before do
+ @calc = Calcolatrice.new
+end
+
+After do
+end
+
+Given /che ho inserito (\d+)/ do |n|
+ @calc.push n.to_i
+end
+
+When 'premo somma' do
+ @result = @calc.add
+end
+
+Then /il risultato deve essere (\d*)/ do |result|
+ @result.should == result.to_i
+end
View
11 examples/i18n/it/lib/calcolatrice.rb
@@ -0,0 +1,11 @@
+class Calcolatrice
+ def push(n)
+ @args ||= []
+ @args << n
+ end
+
+ def add
+ #@args[0] + @args[1]
+ @args.inject(0){|n,sum| sum+=n}
+ end
+end
View
1  examples/i18n/ja/.gitignore
@@ -0,0 +1 @@
+features.html
View
5 examples/i18n/ja/README.txt
@@ -0,0 +1,5 @@
+Run the features with
+
+ rake features
+
+There is a bug in the calculator. Can you spot it and fix it?
View
6 examples/i18n/ja/Rakefile
@@ -0,0 +1,6 @@
+$:.unshift(File.dirname(__FILE__) + '/../../../lib')
+require 'cucumber/rake/task'
+
+Cucumber::Rake::Task.new do |t|
+ t.cucumber_opts = "--language ja"
+end
View
17 examples/i18n/ja/features/addition.feature
@@ -0,0 +1,17 @@
+フィーチャ: 加算
+ バカな間違いを避けるために
+ 数学オンチとして
+ 2つの数の合計を知りたい
+
+ シナリオ: 2つの数の加算について
+ 前提 50 を入力
+ かつ 70 を入力
+ もし add ボタンを押した
+ ならば 結果は 120 を表示
+ かつ 結果のクラスは Fixnum
+
+ 他のサンプル:
+ | 入力1 | 入力2 | 実行 | 表示 | クラス |
+ | 20 | 30 | add | 50 | Fixnum |
+ | 2 | 5 | add | 7 | Fixnum |
+ | 0 | 40 | add | 40 | Fixnum |
View
10 examples/i18n/ja/features/division.feature
@@ -0,0 +1,10 @@
+フィーチャ: 除算
+ バカな間違いを避けるために
+ 有理数も計算できること
+
+ シナリオ: ふつうの数値
+ 前提 3 を入力
+ かつ 2 を入力
+ もし divide ボタンを押した
+ ならば 結果は 1.5 を表示
+ かつ 結果のクラスは Float
View
30 examples/i18n/ja/features/step_definitons/calculator_steps.rb
@@ -0,0 +1,30 @@
+require 'spec'
+$:.unshift(File.dirname(__FILE__) + '/../../lib')
+require 'calculator'
+
+Before do
+ @calc = Calculator.new
+end
+
+After do
+end
+
+Given "$n を入力" do |n|
+ @calc.push n.to_i
+end
+
+When /(\w+) ボタンを押した/ do |op|
+ @result = @calc.send op
+end
+
+Then /結果は (.*) を表示/ do |result|
+ @result.should == result.to_f
+end
+
+Then /結果のクラスは (\w*)/ do |class_name|
+ @result.class.name.should == class_name
+end
+
+Given /it should rain on (\w+)/ do |day|
+ @calc.rain?(day).should == true
+end
View
14 examples/i18n/ja/lib/calculator.rb
@@ -0,0 +1,14 @@
+class Calculator
+ def push(n)
+ @args ||= []
+ @args << n
+ end
+
+ def add
+ @args.inject(0){|n,sum| sum+=n}
+ end
+
+ def divide
+ @args[0].to_f / @args[1].to_f
+ end
+end
View
6 examples/i18n/no/Rakefile
@@ -0,0 +1,6 @@
+$:.unshift(File.dirname(__FILE__) + '/../../../lib')
+require 'cucumber/rake/task'
+
+Cucumber::Rake::Task.new do |t|
+ t.cucumber_opts = "--language no"
+end
View
0  ...ian_calculator/features/steps/kalkulator_steps.rb → ...n/no/features/step_definitons/kalkulator_steps.rb
File renamed without changes
View
0  ...s/norwegian_calculator/features/summering.feature → examples/i18n/no/features/summering.feature
File renamed without changes
View
0  examples/danish_calculator/lib/kalkulator.rb → examples/i18n/no/lib/kalkulator.rb
File renamed without changes
View
6 examples/i18n/pt/Rakefile
@@ -0,0 +1,6 @@
+$:.unshift(File.dirname(__FILE__) + '/../../../lib')
+require 'cucumber/rake/task'
+
+Cucumber::Rake::Task.new do |t|
+ t.cucumber_opts = "--language pt"
+end
View
0  ...les/portuguese_calculator/features/adicao.feature → examples/i18n/pt/features/adicao.feature
File renamed without changes
View
13 ...rtuguese_calculator/features/calculadora_steps.rb → ...pt/features/step_definitions/calculadora_steps.rb
@@ -1,15 +1,6 @@
require 'spec'
-
-class Calculadora
- def push(n)
- @args ||= []
- @args << n
- end
-
- def soma
- @args.inject(0) {|n,sum| sum+n}
- end
-end
+$:.unshift(File.dirname(__FILE__) + '/../../lib')
+require 'calculadora'
Before do
@calc = Calculadora.new
View
10 examples/i18n/pt/lib/calculadora.rb
@@ -0,0 +1,10 @@
+class Calculadora
+ def push(n)
+ @args ||= []
+ @args << n
+ end
+
+ def soma
+ @args.inject(0) {|n,sum| sum+n}
+ end
+end
View
6 examples/i18n/ro/Rakefile
@@ -0,0 +1,6 @@
+$:.unshift(File.dirname(__FILE__) + '/../../../lib')
+require 'cucumber/rake/task'
+
+Cucumber::Rake::Task.new do |t|
+ t.cucumber_opts = "--language ro"
+end
View
22 examples/i18n/ro/features/step_definitons/calculator_steps.rb
@@ -0,0 +1,22 @@
+require 'spec'
+$:.unshift(File.dirname(__FILE__) + '/../../lib')
+require 'calculator'
+
+Before do
+ @calc = Calculator.new
+end
+
+After do
+end
+
+Given /introduc (\d+)/ do |n|
+ @calc.push n.to_i
+end
+
+When 'apas suma' do
+ @result = @calc.add
+end
+
+Then /rezultatul trebuie sa fie (\d*)/ do |result|
+ @result.should == result.to_i
+end
View
10 examples/i18n/ro/features/suma.feature
@@ -0,0 +1,10 @@
+Functionalitate: suma
+ Pentru a nu face erori stupide
+ Ca utilizator
+ Vreau sa stiu suma a doua numere
+
+ Scenariu: suma a doua numere
+ Daca introduc 5
+ Si apoi introduc 7
+ Cand apas suma
+ Atunci rezultatul trebuie sa fie 12
View
11 examples/i18n/ro/lib/calculator.rb
@@ -0,0 +1,11 @@
+class Calculator
+ def push(n)
+ @args ||= []
+ @args << n
+ end
+
+ def add
+ #@args[0] + @args[1]
+ @args.inject(0){|n,sum| sum+=n}
+ end
+end
View
6 examples/i18n/se/Rakefile
@@ -0,0 +1,6 @@
+$:.unshift(File.dirname(__FILE__) + '/../../../lib')
+require 'cucumber/rake/task'
+
+Cucumber::Rake::Task.new do |t|
+ t.cucumber_opts = "--language se"
+end
View
22 examples/i18n/se/features/step_definitons/kalkulator_steps.rb
@@ -0,0 +1,22 @@
+require 'spec'
+$:.unshift(File.dirname(__FILE__) + '/../../lib')
+require 'kalkulator'
+
+Before do
+ @calc = Kalkulator.new
+end
+
+After do
+end
+
+Given /att jag har knappat in (\d+)/ do |n|
+ @calc.push n.to_i
+end
+
+When 'jag summerar' do
+ @result = @calc.add
+end
+
+Then /ska resultatet vara (\d+)/ do |result|
+ @result.should == result.to_i
+end
View
17 examples/i18n/se/features/summering.feature
@@ -0,0 +1,17 @@
+Egenskap: Summering
+ För att slippa att göra dumma fel
+ Som räknare
+ Vill jag kunna lägga samman
+
+ Scenario: två tal
+ Givet att jag har knappat in 5
+ Och att jag har knappat in 7
+ När jag summerar
+ Så ska resultatet vara 12
+
+ Scenario: tre tal
+ Givet att jag har knappat in 5
+ Och att jag har knappat in 4
+ Och att jag har knappat in 3
+ När jag summerar
+ Så ska resultatet vara 12
View
11 examples/i18n/se/lib/kalkulator.rb
@@ -0,0 +1,11 @@
+class Kalkulator
+ def push(n)
+ @args ||= []
+ @args << n
+ end
+
+ def add
+ #@args[0] + @args[1]
+ @args.inject(0){|n,sum| sum+=n}
+ end
+end
View
6 examples/i18n/zh-CN/Rakefile
@@ -0,0 +1,6 @@
+$:.unshift(File.dirname(__FILE__) + '/../../../lib')
+require 'cucumber/rake/task'
+
+Cucumber::Rake::Task.new do |t|
+ t.cucumber_opts = "--language zh-CN"
+end
View
17 examples/i18n/zh-CN/features/addition.feature
@@ -0,0 +1,17 @@
+功能:加法
+ 为了避免一些愚蠢的错误
+ 作为一个数学白痴
+ 我希望有人告诉我数字相加的结果
+
+ 场景: 两个数相加
+ 假如我已经在计算器里输入6
+ 而且我已经在计算器里输入7
+ 当我按相加按钮
+ 那么我应该在屏幕上看到的结果是13
+
+ 场景: 三个数相加
+ 假如我已经在计算器里输入6
+ 而且我已经在计算器里输入7
+ 而且我已经在计算器里输入1
+ 当我按相加按钮
+ 那么我应该在屏幕上看到的结果是14
View
24 examples/i18n/zh-CN/features/step_definitons/calculator_steps.rb
@@ -0,0 +1,24 @@
+require 'spec'
+$:.unshift(File.dirname(__FILE__) + '/../../lib')
+require 'calculator'
+
+Before do
+ @calc = Calculator.new
+end
+
+After do
+end
+
+Given "我已经在计算器里输入$n" do |n|
+ @calc.push n.to_i
+end
+
+When /我按(.*)按钮/ do |op|
+ if op == '相加'
+ @result = @calc.send "add"
+ end
+end
+
+Then /我应该在屏幕上看到的结果是(.*)/ do |result|
+ @result.should == result.to_f
+end
View
10 examples/i18n/zh-CN/lib/calculator.rb
@@ -0,0 +1,10 @@
+class Calculator
+ def push(n)
+ @args ||= []
+ @args << n
+ end
+
+ def add
+ @args.inject(0){|n,sum| sum+=n}
+ end
+end
View
2  examples/java/features/steps/hello_steps.rb → ...ples/java/features/step_definitons/hello_steps.rb
@@ -20,6 +20,6 @@
@hello.friend?(name).should == true
end
-Then /I should get (\w+)'s phone number/ do |name|
+Then /I should get (\w+)'s phone number/ do |name| #'
@hello.getPhoneNumber(name).should_not == nil
end
View
0  examples/java/features/steps/tree_steps.rb → examples/java/features/step_definitons/tree_steps.rb
File renamed without changes
View
6 examples/norwegian_calculator/Rakefile
@@ -1,6 +0,0 @@
-$:.unshift(File.dirname(__FILE__) + '/../../lib')
-require 'cucumber/rake/task'
-
-Cucumber::Rake::Task.new do |t|
- t.cucumber_opts = "--format pretty --language no"
-end
View
6 examples/portuguese_calculator/Rakefile
@@ -1,6 +0,0 @@
-$:.unshift(File.dirname(__FILE__) + '/../../lib')
-require 'cucumber/rake/task'
-
-Cucumber::Rake::Task.new do |t|
- t.cucumber_opts = "--format pretty --language pt"
-end
View
0  examples/selenium/features/steps/stories_steps.rb → ...elenium/features/step_definitons/stories_steps.rb
File renamed without changes
View
6 examples/spanish_calculator/Rakefile
@@ -1,6 +0,0 @@
-$:.unshift(File.dirname(__FILE__) + '/../../lib')
-require 'cucumber/rake/task'
-
-Cucumber::Rake::Task.new do |t|
- t.cucumber_opts = "--format pretty --language es"
-end
View
9 examples/tickets/Rakefile
@@ -1,4 +1,11 @@
$:.unshift(File.dirname(__FILE__) + '/../../lib')
require 'cucumber/rake/task'
-Cucumber::Rake::Task.new
+# Try these:
+#
+# rake features
+# rake features PROFILE=html
+Cucumber::Rake::Task.new do |t|
+ profile = ENV['PROFILE'] || 'default'
+ t.cucumber_opts = "--profile #{profile}"
+end
View
2  examples/tickets/cucumber.yml
@@ -0,0 +1,2 @@
+default: --format pretty
+html: --format html --out features.html
View
32 examples/tickets/features/step_definitons/tickets_steps.rb
@@ -0,0 +1,32 @@
+require 'spec'
+
+Given "be_empty" do
+ [1,2].should_not be_empty
+end
+
+Given "nested step is called" do
+ Given "nested step"
+end
+
+Given "nested step" do
+ @magic = 'mushroom'
+end
+
+Then "nested step should be executed" do
+ @magic.should == 'mushroom'
+end
+
+Given /^the following table$/ do |table|
+ @table = table
+end
+
+Then /^I should be (\w+) in (\w+)$/ do |key, value|
+ hash = @table.hashes[0]
+ hash[key].should == value
+end
+
+Then /^I shoule see a multiline string like$/ do |s|
+ s.should == %{A string
+that spans
+several lines}
+end
View
23 examples/tickets/features/steps/tickets_steps.rb
@@ -1,23 +0,0 @@
-require 'spec'
-
-def run_step(name)
- _, args, proc = $executor.instance_variable_get(:@step_mother).regexp_args_proc(name)
- world = $executor.instance_variable_get(:@world)
- proc.call_in(world, *args)
-end
-
-Given "be_empty" do
- [1,2].should_not be_empty
-end
-
-Given "calling step is called" do
- run_step "nested step"
-end
-
-Given "nested step" do
- @magic = 'mushroom'
-end
-
-Then "nested step should be executed" do
- @magic.should == 'mushroom'
-end
View
17 examples/tickets/features/tickets.feature
@@ -7,5 +7,18 @@ Feature: Cucumber
Given be_empty
Scenario: Call step from step
- Given calling step is called
- Then nested step should be executed
+ Given nested step is called
+ Then nested step should be executed
+
+ Scenario: Reading a table
+ Given the following table
+ | born | working |
+ | Oslo | London |
+ Then I should be working in London
+ And I should be born in Oslo
+ And I shoule see a multiline string like
+ """
+ A string
+ that spans
+ several lines
+ """
View
4 examples/watir/features/search.feature
@@ -5,5 +5,5 @@ Feature: Search
Scenario: Find what I'm looking for
Given I am on the Google search page
- When I search for "rspec"
- Then I should see a link to "RSpec-1.1.5: Overview":http://rspec.info/
+ When I search for "cucumber github"
+ Then I should see a link to "Ruby on Rails — cucumber — GitHub":http://github.com/aslakhellesoy/cucumber/wikis/ruby-on-rails
View
0  examples/watir/features/steps/stories_steps.rb → ...s/watir/features/step_definitons/stories_steps.rb
File renamed without changes
View
42 gem_tasks/treetop.rake
@@ -1,27 +1,41 @@
class FeatureCompiler
- def compile
+ def initialize
require 'yaml'
require 'erb'
- tt = PLATFORM =~ /mswin|mingw/ ? 'tt.bat' : 'tt'
+
+ @tt = PLATFORM =~ /mswin|mingw/ ? 'tt.bat' : 'tt'
- template = ERB.new(IO.read(File.dirname(__FILE__) + '/../lib/cucumber/treetop_parser/feature.treetop.erb'))
- langs = YAML.load_file(File.dirname(__FILE__) + '/../lib/cucumber/languages.yml')
-
- langs.each do |lang, words|
- grammar_file = File.dirname(__FILE__) + "/../lib/cucumber/treetop_parser/feature_#{lang}.treetop"
- grammar = template.result(binding)
- File.open(grammar_file, "wb") do |io|
- io.write(grammar)
- end
- sh "#{tt} #{grammar_file}"
- FileUtils.rm(grammar_file)
+ @template = ERB.new(IO.read(File.dirname(__FILE__) + '/../lib/cucumber/treetop_parser/feature.treetop.erb'))
+ @langs = YAML.load_file(File.dirname(__FILE__) + '/../lib/cucumber/languages.yml')
+ end
+
+ def compile_all
+ @langs.keys.each do |lang|
+ compile(lang)
+ end
+ end
+
+ def compile(lang)
+ words = @langs['en'].merge(@langs[lang]) # Use English words if languages.yml is missing a word
+ grammar_file = File.dirname(__FILE__) + "/../lib/cucumber/treetop_parser/feature_#{lang}.treetop"
+ ruby_file = File.dirname(__FILE__) + "/../lib/cucumber/treetop_parser/feature_#{lang}.rb"
+ grammar = @template.result(binding)
+ File.open(grammar_file, "wb") do |io|
+ io.write(grammar)
end
+ sh "#{@tt} #{grammar_file}"
+ FileUtils.rm(grammar_file)
end
end
namespace :treetop do
desc 'Compile the grammar for all languages in languages.yml'
task :compile do
- FeatureCompiler.new.compile
+ FeatureCompiler.new.compile_all
+ end
+
+ desc 'Compile the English grammar'
+ task :compile_en do
+ FeatureCompiler.new.compile('en')
end
end
View
17 gem_tasks/website.rake
@@ -1,17 +0,0 @@
-desc 'Generate website files'
-task :website_generate => :ruby_env do
- (Dir['website/**/*.txt'] - Dir['website/version*.txt']).each do |txt|
- sh %{ #{RUBY_APP} script/txt2html #{txt} > #{txt.gsub(/txt$/,'html')} }
- end
-end
-
-desc 'Upload website files to rubyforge'
-task :website_upload do
- host = "#{rubyforge_username}@rubyforge.org"
- remote_dir = "/var/www/gforge-projects/#{PATH}/"
- local_dir = 'website'
- sh %{rsync -aCv #{local_dir}/ #{host}:#{remote_dir}}
-end
-
-desc 'Generate and upload website files'
-task :website => [:website_generate, :website_upload, :publish_docs]
View
27 generators/cucumber/cucumber_generator.rb
@@ -1,27 +0,0 @@
-require 'rbconfig'
-
-# This generator bootstraps a Rails project for use with Cucumber
-class CucumberGenerator < Rails::Generator::Base
- DEFAULT_SHEBANG = File.join(Config::CONFIG['bindir'],
- Config::CONFIG['ruby_install_name'])
- def manifest
- record do |m|
- script_options = { :chmod => 0755, :shebang => options[:shebang] == DEFAULT_SHEBANG ? nil : options[:shebang] }
-
- m.directory 'features/steps'
- m.file 'env.rb', 'features/steps/env.rb'
- m.file 'common_webrat.rb', 'features/steps/common_webrat.rb'
-
- m.directory 'lib/tasks'
- m.file 'cucumber.rake', 'lib/tasks/cucumber.rake'
- m.file 'cucumber', 'script/cucumber', script_options
- end
- end
-
-protected
-
- def banner
- "Usage: #{$0} cucumber"
- end
-
-end
View
51 generators/cucumber/templates/common_webrat.rb
@@ -1,51 +0,0 @@
-# Commonly used webrat steps
-# http://github.com/brynary/webrat
-
-When /^I press "(.*)"$/ do |button|
- clicks_button(button)
-end
-
-When /^I follow "(.*)"$/ do |link|
- clicks_link(link)
-end
-
-When /^I fill in "(.*)" with "(.*)"$/ do |field, value|
- fills_in(field, :with => value)
-end
-
-When /^I select "(.*)" from "(.*)"$/ do |field, value|
- selects(value, :from => field)
-end
-
-When /^I check "(.*)"$/ do |field|
- checks(field)
-end
-
-When /^I uncheck "(.*)"$/ do |field|
- unchecks(field)
-end
-
-When /^I choose "(.*)"$/ do |field|
- chooses(field)
-end
-
-When /^I attach the file at "(.*)" to "(.*)" $/ do |path, field|
- attaches_file(field, path)
-end
-
-When /^I go to (.*)$/ do |page|
- visits case page
- when "the home page"
- "/"
- else
- raise "Can't find mapping from \"#{page}\" to a path"