cucumber 2.0.0.beta.3 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +3 -3
  3. data/History.md +131 -32
  4. data/Rakefile +0 -2
  5. data/cucumber.gemspec +4 -3
  6. data/examples/i18n/ht/Rakefile +6 -0
  7. data/examples/i18n/ht/features/adisyon.feature +17 -0
  8. data/examples/i18n/ht/features/divizyon.feature +10 -0
  9. data/examples/i18n/ht/features/step_definitions/kalkilatris_steps.rb +25 -0
  10. data/examples/i18n/ht/lib/kalkilatris.rb +14 -0
  11. data/examples/tcl/features/step_definitions/fib_steps.rb +1 -1
  12. data/features/docs/cli/dry_run.feature +48 -0
  13. data/features/docs/cli/exclude_files.feature +1 -2
  14. data/features/docs/cli/run_specific_scenarios.feature +28 -66
  15. data/features/docs/cli/strict_mode.feature +24 -1
  16. data/features/docs/defining_steps/nested_steps.feature +49 -0
  17. data/features/docs/defining_steps/skip_scenario.feature +31 -2
  18. data/features/docs/defining_steps/snippets.feature +15 -0
  19. data/features/docs/exception_in_after_step_hook.feature +1 -1
  20. data/features/docs/exception_in_around_hook.feature +80 -0
  21. data/features/docs/extending_cucumber/custom_filter.feature +29 -0
  22. data/features/docs/extending_cucumber/custom_formatter.feature +65 -7
  23. data/features/docs/formatters/debug_formatter.feature +24 -17
  24. data/features/docs/formatters/json_formatter.feature +65 -1
  25. data/features/docs/formatters/junit_formatter.feature +40 -0
  26. data/features/docs/formatters/pretty_formatter.feature +42 -0
  27. data/features/docs/formatters/rerun_formatter.feature +3 -2
  28. data/features/docs/getting_started.feature +1 -1
  29. data/features/docs/{wire_protocol_erb.feature → wire_protocol/erb_configuration.feature} +2 -2
  30. data/features/docs/wire_protocol/handle_unexpected_response.feature +30 -0
  31. data/features/docs/wire_protocol/invoke_message.feature +216 -0
  32. data/features/docs/wire_protocol/readme.md +26 -0
  33. data/features/docs/wire_protocol/snippets_message.feature +51 -0
  34. data/features/docs/wire_protocol/step_matches_message.feature +81 -0
  35. data/features/docs/{wire_protocol_table_diffing.feature → wire_protocol/table_diffing.feature} +1 -0
  36. data/features/docs/{wire_protocol_tags.feature → wire_protocol/tags.feature} +1 -0
  37. data/features/docs/{wire_protocol_timeouts.feature → wire_protocol/timeouts.feature} +1 -0
  38. data/features/docs/work_in_progress.feature +1 -1
  39. data/features/docs/writing_support_code/after_hooks.feature +24 -0
  40. data/features/docs/writing_support_code/around_hooks.feature +31 -0
  41. data/features/docs/writing_support_code/before_hook.feature +7 -3
  42. data/features/docs/writing_support_code/tagged_hooks.feature +44 -6
  43. data/features/lib/step_definitions/wire_steps.rb +18 -1
  44. data/features/lib/support/fake_wire_server.rb +10 -7
  45. data/lib/cucumber/cli/configuration.rb +6 -11
  46. data/lib/cucumber/cli/main.rb +2 -2
  47. data/lib/cucumber/cli/options.rb +8 -1
  48. data/lib/cucumber/cli/profile_loader.rb +1 -1
  49. data/lib/cucumber/core_ext/instance_exec.rb +1 -1
  50. data/lib/cucumber/encoding.rb +5 -0
  51. data/lib/cucumber/errors.rb +8 -0
  52. data/lib/cucumber/file_specs.rb +3 -1
  53. data/lib/cucumber/filters/activate_steps.rb +33 -0
  54. data/lib/cucumber/filters/apply_after_hooks.rb +9 -0
  55. data/lib/cucumber/filters/apply_after_step_hooks.rb +12 -0
  56. data/lib/cucumber/filters/apply_around_hooks.rb +12 -0
  57. data/lib/cucumber/filters/apply_before_hooks.rb +9 -0
  58. data/lib/cucumber/{runtime → filters}/gated_receiver.rb +5 -1
  59. data/lib/cucumber/filters/prepare_world.rb +45 -0
  60. data/lib/cucumber/filters/quit.rb +28 -0
  61. data/lib/cucumber/filters/randomizer.rb +40 -0
  62. data/lib/cucumber/{runtime → filters}/tag_limits/test_case_index.rb +4 -2
  63. data/lib/cucumber/{runtime → filters}/tag_limits/verifier.rb +4 -2
  64. data/lib/cucumber/filters/tag_limits.rb +45 -0
  65. data/lib/cucumber/filters.rb +9 -0
  66. data/lib/cucumber/formatter/ansicolor.rb +0 -8
  67. data/lib/cucumber/formatter/console.rb +37 -20
  68. data/lib/cucumber/formatter/debug.rb +1 -8
  69. data/lib/cucumber/formatter/fanout.rb +27 -0
  70. data/lib/cucumber/formatter/gherkin_formatter_adapter.rb +10 -9
  71. data/lib/cucumber/formatter/html.rb +31 -6
  72. data/lib/cucumber/formatter/ignore_missing_messages.rb +20 -0
  73. data/lib/cucumber/formatter/junit.rb +97 -2
  74. data/lib/cucumber/formatter/legacy_api/adapter.rb +1060 -0
  75. data/lib/cucumber/formatter/legacy_api/ast.rb +376 -0
  76. data/lib/cucumber/formatter/legacy_api/results.rb +51 -0
  77. data/lib/cucumber/formatter/legacy_api/runtime_facade.rb +30 -0
  78. data/lib/cucumber/formatter/pretty.rb +14 -0
  79. data/lib/cucumber/formatter/progress.rb +10 -0
  80. data/lib/cucumber/formatter/rerun.rb +14 -88
  81. data/lib/cucumber/hooks.rb +97 -0
  82. data/lib/cucumber/language_support/language_methods.rb +0 -54
  83. data/lib/cucumber/multiline_argument/data_table.rb +41 -29
  84. data/lib/cucumber/platform.rb +3 -3
  85. data/lib/cucumber/project_initializer.rb +43 -0
  86. data/lib/cucumber/rb_support/rb_hook.rb +2 -2
  87. data/lib/cucumber/rb_support/rb_step_definition.rb +11 -2
  88. data/lib/cucumber/rb_support/rb_transform.rb +3 -1
  89. data/lib/cucumber/rb_support/rb_world.rb +2 -2
  90. data/lib/cucumber/rb_support/snippet.rb +1 -1
  91. data/lib/cucumber/rspec/doubles.rb +1 -1
  92. data/lib/cucumber/running_test_case.rb +115 -0
  93. data/lib/cucumber/runtime/after_hooks.rb +24 -0
  94. data/lib/cucumber/runtime/before_hooks.rb +23 -0
  95. data/lib/cucumber/runtime/for_programming_languages.rb +4 -8
  96. data/lib/cucumber/runtime/step_hooks.rb +22 -0
  97. data/lib/cucumber/runtime/support_code.rb +70 -5
  98. data/lib/cucumber/runtime.rb +56 -112
  99. data/lib/cucumber/step_match.rb +26 -2
  100. data/lib/cucumber.rb +7 -3
  101. data/spec/cucumber/cli/configuration_spec.rb +16 -1
  102. data/spec/cucumber/cli/profile_loader_spec.rb +10 -0
  103. data/spec/cucumber/core_ext/instance_exec_spec.rb +4 -0
  104. data/spec/cucumber/file_specs_spec.rb +21 -2
  105. data/spec/cucumber/filters/activate_steps_spec.rb +57 -0
  106. data/spec/cucumber/{runtime → filters}/gated_receiver_spec.rb +3 -3
  107. data/spec/cucumber/{runtime → filters}/tag_limits/test_case_index_spec.rb +3 -3
  108. data/spec/cucumber/{runtime → filters}/tag_limits/verifier_spec.rb +4 -4
  109. data/spec/cucumber/{runtime/tag_limits/filter_spec.rb → filters/tag_limits_spec.rb} +6 -6
  110. data/spec/cucumber/formatter/debug_spec.rb +25 -530
  111. data/spec/cucumber/formatter/html_spec.rb +140 -0
  112. data/spec/cucumber/formatter/junit_spec.rb +212 -156
  113. data/spec/cucumber/formatter/legacy_api/adapter_spec.rb +2090 -0
  114. data/spec/cucumber/formatter/pretty_spec.rb +248 -2
  115. data/spec/cucumber/formatter/rerun_spec.rb +107 -0
  116. data/spec/cucumber/formatter/spec_helper.rb +17 -8
  117. data/spec/cucumber/hooks_spec.rb +30 -0
  118. data/spec/cucumber/multiline_argument/data_table_spec.rb +53 -47
  119. data/spec/cucumber/project_initializer_spec.rb +87 -0
  120. data/spec/cucumber/rb_support/rb_language_spec.rb +2 -2
  121. data/spec/cucumber/rb_support/rb_step_definition_spec.rb +32 -7
  122. data/spec/cucumber/rb_support/rb_transform_spec.rb +20 -0
  123. data/spec/cucumber/rb_support/snippet_spec.rb +6 -6
  124. data/spec/cucumber/running_test_case_spec.rb +83 -0
  125. data/spec/cucumber/runtime_spec.rb +1 -5
  126. data/spec/spec_helper.rb +3 -4
  127. metadata +149 -107
  128. data/bin/cuke +0 -60
  129. data/features/docs/extending_cucumber/formatter_callbacks.feature +0 -370
  130. data/features/docs/output_from_hooks.feature +0 -128
  131. data/features/docs/report_called_undefined_steps.feature +0 -57
  132. data/features/docs/wire_protocol.feature +0 -337
  133. data/gem_tasks/yard/default/layout/html/bubble_32x32.png +0 -0
  134. data/gem_tasks/yard/default/layout/html/footer.erb +0 -5
  135. data/gem_tasks/yard/default/layout/html/index.erb +0 -1
  136. data/gem_tasks/yard/default/layout/html/layout.erb +0 -25
  137. data/gem_tasks/yard/default/layout/html/logo.erb +0 -1
  138. data/gem_tasks/yard/default/layout/html/setup.rb +0 -4
  139. data/gem_tasks/yard.rake +0 -43
  140. data/lib/cucumber/mappings.rb +0 -238
  141. data/lib/cucumber/reports/legacy_formatter.rb +0 -1349
  142. data/lib/cucumber/runtime/results.rb +0 -64
  143. data/lib/cucumber/runtime/tag_limits/filter.rb +0 -31
  144. data/lib/cucumber/runtime/tag_limits.rb +0 -15
  145. data/spec/cucumber/mappings_spec.rb +0 -180
  146. data/spec/cucumber/reports/legacy_formatter_spec.rb +0 -1860
  147. data/spec/cucumber/runtime/results_spec.rb +0 -88
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1b115e5b0a7ae23e6b0372462a320314ee144811
4
- data.tar.gz: 3143905ef42ea795c85cc6163dedf95bd670f582
3
+ metadata.gz: f689c6406ffc1e57288a28a0f95964ee7e9cd8a9
4
+ data.tar.gz: bf78142a081688825cc6df788f4ac8ce53157f8a
5
5
  SHA512:
6
- metadata.gz: 1144b0d0bdf707e16db0b4d389aa7242f870df050db0da4ffe6c749e26309dfbd0bec80eb3db5995c27456e8cddd610bcb242d4a407a3a5887a0933c510e2744
7
- data.tar.gz: dcfa6d1ca0b6af5abb794495a6872509976519c40af52075f78056593dfde8d397e10ae7d67ae3f2aa710ac2a6401aaca6c481747033d38d8d35c911f20acb08
6
+ metadata.gz: 1ea1190a5e0b95e005c51c5e863f6013cb48ece1d38b8517417e34fa3776712bf6847dd610dbe690f4878b2b0b3e2334650254fb5a47089718ea62b4667ce7bf
7
+ data.tar.gz: 75e0e18e55d05db858de5b290986d4c7d304670c5c9061ec3dbd500621ebfa89b45d562d0a4ed74273807339a7c4e6a078ff40a72dcf8bd3fd39f7033de34cf4
data/.travis.yml CHANGED
@@ -1,6 +1,7 @@
1
1
  rvm:
2
- - 2.1.0
3
- - 2.0.0
2
+ - 2.2
3
+ - 2.1
4
+ - 2.0
4
5
  - 1.9.3
5
6
  - jruby-1.7.12
6
7
 
@@ -9,7 +10,6 @@ branches:
9
10
  only:
10
11
  - master
11
12
  - v1.3.x-bugfix
12
- - ruby-2-1-support
13
13
 
14
14
  notifications:
15
15
  email:
data/History.md CHANGED
@@ -1,31 +1,125 @@
1
- ## [In Git](https://github.com/cucumber/cucumber/compare/v.2.0.0.beta.2...master)
1
+ ## [In Git](https://github.com/cucumber/cucumber/compare/v2.0.0...master)
2
+
3
+ ## [v2.0.0](https://github.com/cucumber/cucumber/compare/v2.0.0.rc.5...v2.0.0)
4
+
5
+ ### New Features
6
+
7
+ * Support ruby 2.2 in master (@mattwynne, @tooky)
8
+ * Tell users to use the `--init` command ([818](https://github.com/cucumber/cucumber/pull/818) @olleolleolle)
9
+
10
+ ### Bugfixes
11
+
12
+ * Ensure After Hooks execute in reverse order (@tooky)
13
+
14
+ ## [v2.0.0.rc5](https://github.com/cucumber/cucumber/compare/v2.0.0.rc.4...v2.0.0.rc.5)
15
+
16
+ ### New Features
17
+
18
+ * Add `--init` command ([699](https://github.com/cucumber/cucumber/pull/699) @LGordon2)
19
+
20
+ ## Bugfixes
21
+
22
+ * Let the JUnitFormatter handle Scenario Outlines with the --expand option ([124](https://github.com/cucumber/cucumber/issues/124), [808](https://github.com/cucumber/cucumber/pull/808) @brasmusson, @richarda)
23
+ * Suggested regexes result in ambigous matches ([663](https://github.com/cucumber/cucumber/pull/663) @rwz)
24
+ * Pass when using both the --dry-run and the --strict options, unless there are undefined steps ([810](https://github.com/cucumber/cucumber/issues/810) @brasmusson)
25
+ * Handle step output correctly for Scenario Outlines with the --expand option ([806](https://github.com/cucumber/cucumber/issues/806) @brasmusson)
26
+ * Fix GBK and UTF-8 (Encoding::CompatibilityError) ([693](https://github.com/cucumber/cucumber/issues/693) @mattwynne)
27
+ * Make the scenario object available in hooks compatible with v1.3.x ([814](https://github.com/cucumber/cucumber/pull/814) @brasmusson)
28
+ * JUnit expand option ([808](https://github.com/cucumber/cucumber/pull/808) @richarda @brasmusson)
29
+ * Around hooks not executing in correct world context ([807](https://github.com/cucumber/cucumber/pull/807) @tooky)
30
+
31
+ ## [v2.0.0.rc.4](https://github.com/cucumber/cucumber/compare/v2.0.0.rc.3...2.0.0.rc.4)
32
+
33
+ ### Features
34
+
35
+ * [Add custom filters from Ruby configuration code](https://github.com/cucumber/cucumber/blob/master/features/docs/extending_cucumber/custom_filter.feature) (@mattwynne)
36
+
37
+ ### Bugfixes
38
+
39
+ * Fix missing `require Forwardable` (@tooky)
40
+ * Fix snippet suggestions ([765](https://github.com/cucumber/cucumber/pull/765) @richarda), also with i18n languages (@brasmusson)
41
+ * Fix transformation of regex with lookahead/lookbehind ([796](https://github.com/cucumber/cucumber/pull/796) @bolshakov)
42
+ * Sort scenarios by location ([789](https://github.com/cucumber/cucumber/issues/789) @mattwynne)
43
+ * Remove keyword from name property of test case object yielded to hooks ([768](https://github.com/cucumber/cucumber/issues/768) @richarda, @akostadinov)
44
+
45
+ ## [v2.0.0.rc.3](https://github.com/cucumber/cucumber/compare/v2.0.0.rc.2...v2.0.0.rc.3)
46
+
47
+ ### Bugfixes
48
+
49
+ * MultilineArgument::DataTable#diff will correctly compare to an Array (@tooky)
50
+
51
+ ## [v2.0.0.rc.2](https://github.com/cucumber/cucumber/compare/v2.0.0.rc.1...v2.0.0.rc.2)
52
+
53
+ ### Bugfixes
54
+
55
+ * World#table no longer creates invalid table objects when using an Array (@tooky, @mattwynne)
56
+
57
+ ## [v2.0.0.rc.1](https://github.com/cucumber/cucumber/compare/v2.0.0.beta.5...v2.0.0.rc.1)
58
+
59
+ ### Removed Features
60
+
61
+ * Removed support for IronRuby (@tooky @mattwynne)
62
+
63
+ ### New Features
64
+
65
+ * Let the HTML formatter store the relative path to files in the report ([697](https://github.com/cucumber/cucumber/pull/697) @idstein, @brasmusson)
66
+ * Allow cucumber.yml to parse % erb code lines ([755](https://github.com/cucumber/cucumber/pull/755) @snowe2010)
67
+ * Give each step definition a unique copy of argument objects ([760](https://github.com/cucumber/cucumber/pull/760) @tooky)
68
+
69
+ ### Bugfixes
70
+
71
+ * Add old Scenario#skip_invoke! method back (@mattwynne)
72
+ * No links to lines in backtrace under TextMate ([548](https://github.com/cucumber/cucumber/pull/548) @bilus)
73
+ * Using file:line CLI to select scenarios was running same scenario multiple times ([786](https://github.com/cucumber/cucumber/pull/786) @jdks)
74
+ * Allow spaces in filenames for rerun formatter ([793](https://github.com/cucumber/cucumber/pull/793) @callahat)
75
+
76
+ ## [v2.0.0.beta.5](https://github.com/cucumber/cucumber/compare/v2.0.0.beta.4...v2.0.0.beta.5)
77
+
78
+ * Depend on the correct version of core (@tooky)
79
+
80
+ ## [v2.0.0.beta.4](https://github.com/cucumber/cucumber/compare/v2.0.0.beta.3...v2.0.0.beta.4)
81
+ ### New Features
82
+
83
+ * Support both new and legacy formatter APIs simultaneously (@mattwynne and @tooky)
84
+
85
+ ### Bugfixes
86
+
87
+ * Localize the Scenario keyword with the --expand option ([766](https://github.com/cucumber/cucumber/pull/766) @brasmusson)
88
+ * Handle hook output appropriately in the HTML formatter ([746](https://github.com/cucumber/cucumber/pull/746), [731](https://github.com/cucumber/cucumber/issues/731), [298](https://github.com/cucumber/cucumber/pull/298) @brasmusson)
89
+ * Handle hook output appropriately in the Pretty formatter ([738](https://github.com/cucumber/cucumber/pull/738) @brasmusson)
90
+
91
+ ### Internal changes
92
+
93
+ * Re-write rerun formatter against new formatter API
94
+
95
+ ## [v2.0.0.beta.3](https://github.com/cucumber/cucumber/compare/v2.0.0.beta.2...v2.0.0.beta.3)
2
96
 
3
97
  ### Removed Features
4
98
 
5
- * The `--dotcucumber` option is no longer supported and `stepdefs.json` is no longer written. (Aslak Hellesøy)
99
+ * The `--dotcucumber` option is no longer supported and `stepdefs.json` is no longer written. (Aslak Hellesøy)
6
100
 
7
101
  ### New Features
8
102
 
9
- * Include both outline step and expanded step in error backtrace ([730](https://github.com/cucumber/cucumber/pull/730) @brasmusson)
10
- * Add TestCase#outline? for conditionals in Before / After hooks ([728](https://github.com/cucumber/cucumber/pull/728) [Erran Carey](https://github.com/erran))
11
- * Support embedding images directly in HTML and JSON reports ([696](https://github.com/cucumber/cucumber/pull/696),[695](https://github.com/cucumber/cucumber/pull/695/files) @brasmusson)
103
+ * Include both outline step and expanded step in error backtrace ([730](https://github.com/cucumber/cucumber/pull/730) @brasmusson)
104
+ * Add TestCase#outline? for conditionals in Before / After hooks ([728](https://github.com/cucumber/cucumber/pull/728) [Erran Carey](https://github.com/erran))
105
+ * Support embedding images directly in HTML and JSON reports ([696](https://github.com/cucumber/cucumber/pull/696),[695](https://github.com/cucumber/cucumber/pull/695/files) @brasmusson)
12
106
 
13
107
  ### Bugfixes
14
108
 
15
- * Pass hook output to the formatters appropriately ([732](https://github.com/cucumber/cucumber/pull/732) @brasmusson)
16
- * Added tests for, and re-added behaviour to support Scenario#failed? in hooks (Matt Wynne)
17
- * Rescuing ArgumentError in HTML formatter so Cucumber won't stop tests due bad encoding ([690](https://github.com/cucumber/cucumber/pull/690) @awls99)
18
- * Add back support for the DataTable API ([729](https://github.com/cucumber/cucumber/pull/729) @mattwynne and @tooky)
19
- * Fix Windows support loading files properly ([739](https://github.com/cucumber/cucumber/issues/739) @os97673)
109
+ * Pass hook output to the formatters appropriately ([732](https://github.com/cucumber/cucumber/pull/732) @brasmusson)
110
+ * Added tests for, and re-added behaviour to support Scenario#failed? in hooks (Matt Wynne)
111
+ * Rescuing ArgumentError in HTML formatter so Cucumber won't stop tests due bad encoding ([690](https://github.com/cucumber/cucumber/pull/690) @awls99)
112
+ * Add back support for the DataTable API ([729](https://github.com/cucumber/cucumber/pull/729) @mattwynne and @tooky)
113
+ * Fix Windows support loading files properly ([739](https://github.com/cucumber/cucumber/issues/739) @os97673)
20
114
 
21
- ## [v2.0.0.beta.2](https://github.com/cucumber/cucumber/compare/v.2.0.0.beta.1...v.2.0.0.beta.2)
115
+ ## [v2.0.0.beta.2](https://github.com/cucumber/cucumber/compare/v2.0.0.beta.1...v2.0.0.beta.2)
22
116
 
23
117
  ### Bugfixes
24
118
 
25
- * Better reporting of exceptions in Before / After hooks ([723](https://github.com/cucumber/cucumber/pull/723) @mattwynne)
26
- * Add `#source_tag_names` method to `TestCase` object passed to hooks (@mattwynne)
119
+ * Better reporting of exceptions in Before / After hooks ([723](https://github.com/cucumber/cucumber/pull/723) @mattwynne)
120
+ * Add `#source_tag_names` method to `TestCase` object passed to hooks (@mattwynne)
27
121
 
28
- ## [v2.0.0.beta.1 ](https://github.com/cucumber/cucumber/compare/v1.3.8...v.2.0.0.beta.1)
122
+ ## [v2.0.0.beta.1 ](https://github.com/cucumber/cucumber/compare/v1.3.8...v2.0.0.beta.1)
29
123
 
30
124
  Version 2.0 contains a major internal redesign, extracting the core logic of
31
125
  parsing and executing tests into a [separate gem](https://github.com/cucumber/cucumber-ruby-core).
@@ -85,7 +179,7 @@ all.
85
179
  ## [v1.3.12](https://github.com/cucumber/cucumber/compare/v1.3.11...v1.3.12)
86
180
 
87
181
  * Use MultiTest to handle assertions library selection (@tooky)
88
- * Adds full support for rails 4.1 / Minitest
182
+ * Adds full support for rails 4.1 / Minitest
89
183
 
90
184
  ## [v1.3.11](https://github.com/cucumber/cucumber/compare/v1.3.10...v1.3.11)
91
185
 
@@ -570,7 +664,7 @@ Bugfix release which most importantly fixes an issue with the gem's gemspec.
570
664
  * JSON formatters (json and json_pretty). (Jari Bakken)
571
665
 
572
666
  ### Removed features
573
- * The --no-diff option is removed. If you're using RSpec you will *always* get diffs. (Aslak Hellesøy)
667
+ * The --no-diff option is removed. If you're using RSpec you will*always* get diffs. (Aslak Hellesøy)
574
668
 
575
669
  ### Changed Features
576
670
  * Upgraded to be compatible with rspec 2.0.0.beta.10 (Aslak Hellesøy)
@@ -775,7 +869,7 @@ Please see History.txt in cucumber-rails for details about what's new on the Rai
775
869
  * "Given" in Dutch is now aliased to "Gegeven" or "Stel". (Iain Hecker)
776
870
  * New --i18n option to list keywords in various languages. (Aslak Hellesøy)
777
871
  * Added a Tcl example using Sam Stephenson's ruby-tcl (Aslak Hellesøy)
778
- * Added * as a synonym for Given/When/Then/And/But (for all i18n languages). (#462 Aslak Hellesøy)
872
+ * Added* as a synonym for Given/When/Then/And/But (for all i18n languages). (#462 Aslak Hellesøy)
779
873
  * The HTML formatter produces a much nicer report, with TextMate link integration. (Rob Aldred)
780
874
  * Wire protocol now supports table arguments, step definition source & regexp, snippets, pending, table diffing (Matt Wynne)
781
875
 
@@ -835,7 +929,7 @@ As usual there are several small features and bug fixes.
835
929
  * New Wire Protocol - allowing out of process execution of Cucumber scenarios. (#428 Matt Wynne)
836
930
  * Added an example illustrating how to get screenshots in HTML reports (examples/watir) (Aslak Hellesøy)
837
931
  * Added new #embed(file, mime_type) method to visitors and Ruby Worlds to make it easier to embed screenshots (Aslak Hellesøy)
838
- * The #puts method available from Ruby Step Definitions will print *after* the step is executed. (#487 Zoltan Penzeli)
932
+ * The #puts method available from Ruby Step Definitions will print*after* the step is executed. (#487 Zoltan Penzeli)
839
933
  * Add support for rolling back transaction for all open database connections. (John Ferlito)
840
934
  * Show scenario and step summary in HTML formatter (#285 Joseph Wilk)
841
935
  * Ast::Table can now be constructed with an Array of Hash. (Aslak Hellesøy)
@@ -888,7 +982,7 @@ The back to stable release. When we went from 0.3.11 to 0.3.90 we thought we wer
888
982
  went nuts and a lot of great contributions came in. Some of those broke backwards compatibility, and we decided it would be
889
983
  better to do this while still on 0.3.x.
890
984
 
891
- Rails users: you *must* run script/generate cucumber after installing this version.
985
+ Rails users: you*must* run script/generate cucumber after installing this version.
892
986
 
893
987
  If something breaks for you, please please please read this file carefully. It's most likely something referenced here, and
894
988
  that will give you more information so you can solve any problems. If not, just get in touch on IRC or the Google Group.
@@ -980,7 +1074,7 @@ Other noteworthy new features are improved Hook, tags and Transform support, and
980
1074
  ### New Features
981
1075
  * Added new internal API for Regexp and groups, allowing other programming languages to leverage native regexps. (Aslak Hellesøy)
982
1076
  * New @allow_rescue tag for Rails scenarios. Causes exceptions raised in actions to be caught by rails and not bubble up to Cucumber (Aslak Hellesøy)
983
- * Negative tags can now be used in hooks, just like the command line's --tags option: Before('~@yarr') - will run for all scenarios that *don't* have the @yarr tag. (Aslak Hellesøy)
1077
+ * Negative tags can now be used in hooks, just like the command line's --tags option: Before('~@yarr') - will run for all scenarios that*don't* have the @yarr tag. (Aslak Hellesøy)
984
1078
  * Transform has current "World" scope (Larry Diehl)
985
1079
  * Other Transforms can be reused by calling Transform with a string inside of another Transform definition (Larry Diehl)
986
1080
  * Execute "After" hooks in reverse order of declaration for better behavior with dependent blocks and to mimic the behavior of at_exit (David Waite)
@@ -994,7 +1088,7 @@ Other noteworthy new features are improved Hook, tags and Transform support, and
994
1088
  * Cucumber with Spork breaks on OS X Snow Leopard (#431 David Chelimsky)
995
1089
 
996
1090
  ### Changed Features
997
- * Tag names passed on the command line *always* have to use the @ sign. --tags foo or --tags ~bar won't work. Use --tags @foo or --tags ~@bar (Aslak Hellesøy)
1091
+ * Tag names passed on the command line*always* have to use the @ sign. --tags foo or --tags ~bar won't work. Use --tags @foo or --tags ~@bar (Aslak Hellesøy)
998
1092
 
999
1093
  ### Removed features
1000
1094
  * The Cucumber::Rails.bypass_rescue no longer exists. Errors will always bubble up, unless you use the new @allow_rescue tag. (Aslak Hellesøy)
@@ -1132,8 +1226,8 @@ You'll achieve better flow this way.
1132
1226
  * Added examples/python that uses rubypython. (Aslak Hellesøy)
1133
1227
  * Checks the number of available colors on the terminal with ruby-terminfo if ruby-terminfo is installed.
1134
1228
  This prevents Apple's Terminal.app from stalling (Yugui - Yuki Sonoda).
1135
- * Set 'xterm-256color' to TERM if your terminal supports grey.
1136
- * ruby-terminfo is available as genki-ruby-terminfo gem from github.
1229
+ * Set 'xterm-256color' to TERM if your terminal supports grey.
1230
+ * ruby-terminfo is available as genki-ruby-terminfo gem from github.
1137
1231
  * Document builtin formatters with --help. (#406 Aslak Hellesøy)
1138
1232
  * Added support for using regular expressions when mapping table headers. (Peter Williams)
1139
1233
 
@@ -1233,7 +1327,7 @@ expected data passed to a step. Here is an example:
1233
1327
  end
1234
1328
 
1235
1329
  You can do the same trick to compare data from a Rails ActiveRecord table (although this is not a
1236
- recommended practice - your Then steps should compare against what users *see*, not what's in the
1330
+ recommended practice - your Then steps should compare against what users*see*, not what's in the
1237
1331
  database):
1238
1332
 
1239
1333
  # This requires that you use the column names in the header of the plain text expected table
@@ -1301,7 +1395,7 @@ thanks to a brand new gem called Spork by Tim Harper and Ben Mabey. (You can fin
1301
1395
  here: http://github.com/timcharper/spork/tree/master). You can start Spork and have it preload your
1302
1396
  application in a separate process. Spork listens for DRb connections, and when you run cucumber with
1303
1397
  --drb the features will run inside the Spork server instead. Spork provides two simple hooks for preloading
1304
- your application - one for framework/stable code (Spork.prefork) and one for the code that *you* write and
1398
+ your application - one for framework/stable code (Spork.prefork) and one for the code that*you* write and
1305
1399
  change often (Spork.each_run). Keep in mind that all World, Before, and other Cucumber hooks need to be
1306
1400
  in the Spork.each_run block. Using Spork works great for Ruby on Rails, which can take a while to load,
1307
1401
  but --drb and Spork aren't tied to Rails at all. The new --drb switch also works great alongside autotest
@@ -1343,7 +1437,7 @@ generator which is fixed in 0.3.9.
1343
1437
  ## [0.3.8](https://github.com/cucumber/cucumber/compare/v0.3.7...v0.3.8)
1344
1438
 
1345
1439
  This Cucumber version fixes several bugs related to Ruby on Rails and RSpec. If you
1346
- use Cucumber with a Rails app we *strongly* recommend you bootstrap Cucumber again:
1440
+ use Cucumber with a Rails app we*strongly* recommend you bootstrap Cucumber again:
1347
1441
 
1348
1442
  ruby script/generate cucumber
1349
1443
 
@@ -1358,7 +1452,7 @@ use Cucumber with a Rails app we *strongly* recommend you bootstrap Cucumber aga
1358
1452
  * The Cucumber Rake task will again fork by default (as 0.3.3 and earlier). Forking must be turned off explicitly. (Aslak Hellesøy)
1359
1453
 
1360
1454
  ### Bugfixes
1361
- * Better coexistence with RSpec - Cucumber now *neuters* the part of RSpec that tries to parse ARGV.
1455
+ * Better coexistence with RSpec - Cucumber now*neuters* the part of RSpec that tries to parse ARGV.
1362
1456
  * The differ= exception is gone (#325, #340 Aslak Hellesøy)
1363
1457
 
1364
1458
  ## [0.3.7](https://github.com/cucumber/cucumber/compare/v0.3.6...v0.3.7)
@@ -1406,7 +1500,7 @@ and there is a brand new JUnit formatter - great for Continuous Integration repo
1406
1500
 
1407
1501
  This release was made especially for the Oslo XP Meetup today.
1408
1502
 
1409
- ** IMPORTANT UPGRADE NOTES FOR RAILS USERS **
1503
+ ** IMPORTANT UPGRADE NOTES FOR RAILS USERS**
1410
1504
 
1411
1505
  Running Cucumber features in the same Ruby interpreter as Rake doesn't seem to work,
1412
1506
  so you have to explicitly tell the task to fork (like it was doing by default in prior
@@ -1546,10 +1640,10 @@ http://wiki.github.com/aslakhellesoy/cucumber/using-rake#profiles
1546
1640
 
1547
1641
  ### Removed/changed features
1548
1642
  * The visitor API has changed slightly:
1549
- * \#visit_step_name, #visit_multiline_arg and \#visit_exception are no longer official API methods.
1550
- * \#visit_step_result replaces those 3 methods.
1551
- * Table and PyString no longer hold status information. Each visitor subclass should store state in @state if needed.
1552
- * \#visit_py_string no longer takes a status argument.
1643
+ * \#visit_step_name, #visit_multiline_arg and \#visit_exception are no longer official API methods.
1644
+ * \#visit_step_result replaces those 3 methods.
1645
+ * Table and PyString no longer hold status information. Each visitor subclass should store state in @state if needed.
1646
+ * \#visit_py_string no longer takes a status argument.
1553
1647
 
1554
1648
  ## [0.2.3](https://github.com/cucumber/cucumber/compare/v0.2.2...v0.2.3)
1555
1649
 
@@ -1999,6 +2093,7 @@ The step definitions for such multiline steps must define an extra block argumen
1999
2093
  * Show the feature file and line for pending steps as a comment when displaying with the pretty formatter. (#40, Joseph Wilk)
2000
2094
 
2001
2095
  ### Bugfixes
2096
+
2002
2097
  * Fixed speling errors in Spanish (Daniel Cadenas)
2003
2098
  * ActionMailer delivery_method should not be set to test (#41, Luke Melia)
2004
2099
  * Reverse incorrectly ordered args in webrat select step (#43, David Chelimsky)
@@ -2006,9 +2101,11 @@ The step definitions for such multiline steps must define an extra block argumen
2006
2101
  * Fixed the HTML Formatter to use actual values for FIT table headers (#30, Joseph Wilk)
2007
2102
 
2008
2103
  ### Removed features
2104
+
2009
2105
  * Removed the /^I go to (.*)$/ step from common_webrat.rb - it's not language agnostic and provides little value.
2010
2106
 
2011
2107
  ### New features
2108
+
2012
2109
  * Added new --out option to make it easier to specify output from Rake and cucumber.yml
2013
2110
 
2014
2111
  ## [0.1.7](https://github.com/cucumber/cucumber/compare/v0.1.6...v0.1.7)
@@ -2054,11 +2151,13 @@ a plain text step is defined. Not anymore! Cucumber will now output this:
2054
2151
  And the result class should be Float # features/steps/calculator_steps.rb:24
2055
2152
 
2056
2153
  ### Bugfixes
2154
+
2057
2155
  * Fixed a bug in the command line args being lost when using --profile (#27, Joseph Wilk)
2058
2156
  * Fixed a bug in Webrat selects (Tim Glen)
2059
2157
  * Fixed parsing of DOS line endings (#2, #28, Aslak Hellesøy)
2060
2158
 
2061
2159
  ### New features
2160
+
2062
2161
  * Steps can be called from other steps (#3, Bryan Helmkamp, Aslak Hellesøy)
2063
2162
  * Added But keyword to all languages (#21, Aslak Hellesøy)
2064
2163
  * Added --no-source option to display step definition location next to step text (#26, Joseph Wilk, Aslak Hellesøy)
data/Rakefile CHANGED
@@ -6,8 +6,6 @@ Bundler::GemHelper.install_tasks
6
6
  $:.unshift(File.dirname(__FILE__) + '/lib')
7
7
  Dir['gem_tasks/**/*.rake'].each { |rake| load rake }
8
8
 
9
- task :release => 'api:doc'
10
-
11
9
  task :default => [:spec, :cucumber]
12
10
 
13
11
  if ENV['TRAVIS']
data/cucumber.gemspec CHANGED
@@ -14,14 +14,14 @@ Gem::Specification.new do |s|
14
14
  s.platform = Gem::Platform::RUBY
15
15
  s.required_ruby_version = ">= 1.9.3"
16
16
 
17
- s.add_dependency 'cucumber-core', '~> 1.0.0.beta.3'
17
+ s.add_dependency 'cucumber-core', '~> 1.1.3'
18
18
  s.add_dependency 'builder', '>= 2.1.2'
19
19
  s.add_dependency 'diff-lcs', '>= 1.1.3'
20
20
  s.add_dependency 'gherkin', '~> 2.12'
21
21
  s.add_dependency 'multi_json', '>= 1.7.5', '< 2.0'
22
- s.add_dependency 'multi_test', '>= 0.1.1'
22
+ s.add_dependency 'multi_test', '>= 0.1.2'
23
23
 
24
- s.add_development_dependency 'aruba', '~> 0.5.3'
24
+ s.add_development_dependency 'aruba', '~> 0.6.1'
25
25
  s.add_development_dependency 'json', '~> 1.7'
26
26
  s.add_development_dependency 'nokogiri', '~> 1.5'
27
27
  s.add_development_dependency 'rake', '>= 0.9.2'
@@ -29,6 +29,7 @@ Gem::Specification.new do |s|
29
29
  s.add_development_dependency 'simplecov', '>= 0.6.2'
30
30
  s.add_development_dependency 'coveralls', '~> 0.7'
31
31
  s.add_development_dependency 'syntax', '>= 1.0.0'
32
+ s.add_development_dependency 'pry'
32
33
 
33
34
  # For Documentation:
34
35
  s.add_development_dependency 'bcat', '~> 0.6.2'
@@ -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 = %w{--format pretty}
6
+ end
@@ -0,0 +1,17 @@
1
+ # language: ht
2
+ Karakteristik: Adisyon
3
+    Nan lòd pou fè pou evite erè komik
4
+    Kòm yon moun sòt nan matematik
5
+    Mwen ta vle yo dim sòm total nan antre de nimero
6
+
7
+ Plan Senaryo: ajoute de nimero
8
+ Sipoze mwen te antre <input_1> nan kalkilatris la
9
+ Epi mwen te antre <input_2> nan kalkilatris la
10
+ Lè Mwen peze <button>
11
+ Rezilta a ta dwe <output> sou ekran an
12
+
13
+ Egzanp:
14
+ | input_1 | input_2 | button | output |
15
+ | 20 | 30 | ajoute | 50 |
16
+ | 2 | 5 | ajoute | 7 |
17
+ | 0 | 40 | ajoute | 40 |
@@ -0,0 +1,10 @@
1
+ # language: ht
2
+ Karakteristik: Divizyon
3
+    Nan lòd pou fè pou evite erè komik
4
+    Kesye-a dwe kapab kalkile yon fraksyon
5
+
6
+    Senaryo: nimewo regilye
7
+      * Mwen te antre 3 nan kalkilatris la
8
+      * Mwen te antre 2 nan kalkilatris la
9
+      * Mwen peze divize
10
+      * Rezilta a ta dwe 1.5 sou ekran an
@@ -0,0 +1,25 @@
1
+
2
+ # encoding: utf-8
3
+ begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end
4
+ require 'cucumber/formatter/unicode'
5
+ $:.unshift(File.dirname(__FILE__) + '/../../lib')
6
+ require 'kalkilatris'
7
+
8
+ Before do
9
+ @kalk = Kalkilatris.new
10
+ end
11
+
12
+ After do
13
+ end
14
+
15
+ Sipoze /Mwen te antre nan (\d+) nan kalkilatris la/ do |n|
16
+ @kalk.push n.to_i
17
+ end
18
+
19
+ Lè /Mwen peze (\w+)/ do |op|
20
+ @result = @kalk.send op
21
+ end
22
+
23
+ Lè sa a /Rezilta a ta dwe (.*) sou ekran an/ do |result|
24
+ @result.should == result.to_f
25
+ end
@@ -0,0 +1,14 @@
1
+ class Kalkilatris
2
+ def push(n)
3
+ @args ||= []
4
+ @args << n
5
+ end
6
+
7
+ def ajoute
8
+ @args.inject(0){|n,sum| sum+=n}
9
+ end
10
+
11
+ def divize
12
+ @args[0].to_f / @args[1].to_f
13
+ end
14
+ end
@@ -3,5 +3,5 @@ When /^I ask Tcl to calculate fibonacci for (\d+)$/ do |n|
3
3
  end
4
4
 
5
5
  Then /^it should give me (\d+)$/ do |expected|
6
- @fib_result.should == expected.to_i
6
+ expect(@fib_result).to eq expected.to_i
7
7
  end
@@ -1,4 +1,7 @@
1
1
  Feature: Dry Run
2
+
3
+ Dry run gives you a way to quickly scan your features without actually running them.
4
+
2
5
  - Invokes formatters without executing the steps.
3
6
  - This also omits the loading of your support/env.rb file if it exists.
4
7
 
@@ -23,3 +26,48 @@ Feature: Dry Run
23
26
  0m0.012s
24
27
 
25
28
  """
29
+
30
+ Scenario: In strict mode
31
+ Given a file named "features/test.feature" with:
32
+ """
33
+ Feature: test
34
+ Scenario:
35
+ Given this step fails
36
+ """
37
+ And the standard step definitions
38
+ When I run `cucumber --dry-run --strict`
39
+ Then it should pass with exactly:
40
+ """
41
+ Feature: test
42
+
43
+ Scenario: # features/test.feature:2
44
+ Given this step fails # features/step_definitions/steps.rb:4
45
+
46
+ 1 scenario (1 skipped)
47
+ 1 step (1 skipped)
48
+ 0m0.012s
49
+
50
+ """
51
+
52
+ Scenario: In strict mode with an undefined step
53
+ Given a file named "features/test.feature" with:
54
+ """
55
+ Feature: test
56
+ Scenario:
57
+ Given this step is undefined
58
+ """
59
+ When I run `cucumber --dry-run --strict`
60
+ Then it should fail with:
61
+ """
62
+ Feature: test
63
+
64
+ Scenario: # features/test.feature:2
65
+ Given this step is undefined # features/test.feature:3
66
+ Undefined step: "this step is undefined" (Cucumber::Undefined)
67
+ features/test.feature:3:in `Given this step is undefined'
68
+
69
+ 1 scenario (1 undefined)
70
+ 1 step (1 undefined)
71
+ 0m0.012s
72
+
73
+ """
@@ -1,4 +1,5 @@
1
1
  Feature: Excluding ruby and feature files from runs
2
+
2
3
  Developers are able to easily exclude files from cucumber runs
3
4
  This is a nice feature to have in conjunction with profiles, so you can exclude
4
5
  certain environment files from certain runs.
@@ -9,9 +10,7 @@ Feature: Excluding ruby and feature files from runs
9
10
  And an empty file named "features/step_definitions/foof.rb"
10
11
  And an empty file named "features/step_definitions/foot.rb"
11
12
  And an empty file named "features/support/require_me.rb"
12
-
13
13
  When I run `cucumber features -q --verbose --exclude features/support/dont --exclude foo[zf]`
14
-
15
14
  Then "features/support/require_me.rb" should be required
16
15
  And "features/step_definitions/foot.rb" should be required
17
16
  And "features/support/dont_require_me.rb" should not be required
@@ -3,6 +3,12 @@ Feature: Run specific scenarios
3
3
  You can choose to run a specific scenario using the file:line format,
4
4
  or you can pass in a file with a list of scenarios using @-notation.
5
5
 
6
+ The line number can fall anywhere within the body of a scenario, including
7
+ steps, tags, comments, description, data tables or doc strings.
8
+
9
+ For scenario outlines, if the line hits one example row, just that one
10
+ will be run. Otherwise all examples in the table or outline will be run.
11
+
6
12
  Background:
7
13
  Given the standard step definitions
8
14
 
@@ -10,83 +16,22 @@ Feature: Run specific scenarios
10
16
  Given a file named "features/test.feature" with:
11
17
  """
12
18
  Feature:
13
- Scenario:
19
+
20
+ Scenario: Miss
14
21
  Given this step is undefined
15
22
 
16
23
  Scenario: Hit
17
24
  Given this step passes
18
25
  """
19
- When I run `cucumber features/test.feature:5 -f progress`
26
+ When I run `cucumber features/test.feature:7 --format pretty --quiet`
20
27
  Then it should pass with:
21
28
  """
22
- 1 scenario (1 passed)
23
- """
24
-
25
- Scenario: Single example from a scenario outline
26
- Given a file named "features/test.feature" with:
27
- """
28
- Feature:
29
- Scenario Outline:
30
- Given this step <something>
31
-
32
- Examples:
33
- | something |
34
- | is undefined |
35
- | fails |
36
-
37
- Scenario: Miss
38
- Given this step passes
39
- """
40
- When I run `cucumber features/test.feature:8 -f progress`
41
- Then it should fail with:
42
- """
43
- 1 scenario (1 failed)
44
- """
45
-
46
- @spawn
47
- Scenario: Specify 2 line numbers where one is a tag
48
- Given a file named "features/test.feature" with:
49
- """
50
- Feature: Sample
29
+ Feature:
51
30
 
52
- @two @three
53
- Scenario:
31
+ Scenario: Hit
54
32
  Given this step passes
55
33
 
56
- @four
57
- Scenario:
58
- Given this step passes
59
- """
60
- When I run `cucumber -q features/test.feature:3:8`
61
- Then it should pass with:
62
- """
63
- 2 scenarios (2 passed)
64
- 2 steps (2 passed)
65
- """
66
-
67
- Scenario: Specify the line number of a row
68
- Given a file named "features/test.feature" with:
69
- """
70
- Feature: Sample
71
- Scenario: Passing
72
- Given this step is a table step
73
- | a | b |
74
- | c | d |
75
-
76
- """
77
- When I run `cucumber -q features/test.feature:4`
78
- Then it should pass with:
79
- """
80
- Feature: Sample
81
-
82
- Scenario: Passing
83
- Given this step is a table step
84
- | a | b |
85
- | c | d |
86
-
87
34
  1 scenario (1 passed)
88
- 1 step (1 passed)
89
-
90
35
  """
91
36
 
92
37
  Scenario: Use @-notation to specify a file containing feature file list
@@ -111,3 +56,20 @@ Feature: Run specific scenarios
111
56
  1 scenario (1 passed)
112
57
  1 step (1 passed)
113
58
  """
59
+
60
+ Scenario: Specify order of scenarios
61
+ Given a file named "features/test.feature" with:
62
+ """
63
+ Feature:
64
+ Scenario:
65
+ Given this step passes
66
+
67
+ Scenario:
68
+ Given this step fails
69
+ """
70
+ When I run `cucumber features/test.feature:5 features/test.feature:3 -f progress`
71
+ Then it should fail with:
72
+ """
73
+ F.
74
+ """
75
+