kosmas58-cucumber 0.1.16.6 → 0.1.99.21

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 (248) hide show
  1. data/History.txt +126 -2
  2. data/License.txt +1 -1
  3. data/Manifest.txt +0 -270
  4. data/Rakefile +1 -1
  5. data/bin/cucumber +2 -2
  6. data/config/hoe.rb +7 -2
  7. data/examples/cs/features/step_definitons/calculator_steps.rb +1 -1
  8. data/examples/i18n/README.textile +1 -1
  9. data/examples/i18n/Rakefile +3 -3
  10. data/examples/i18n/ar/features/step_definitons/calculator_steps.rb +1 -6
  11. data/examples/i18n/da/features/step_definitons/kalkulator_steps.rb +1 -1
  12. data/examples/i18n/de/features/addition.feature +6 -6
  13. data/examples/i18n/de/features/step_definitons/calculator_steps.rb +2 -2
  14. data/examples/i18n/en/features/addition.feature +6 -6
  15. data/examples/i18n/en/features/step_definitons/calculator_steps.rb +2 -2
  16. data/examples/i18n/es/features/adicion.feature +11 -12
  17. data/examples/i18n/es/features/step_definitons/calculador_steps.rb +7 -10
  18. data/examples/i18n/es/lib/calculador.rb +4 -1
  19. data/examples/i18n/et/features/liitmine.feature +7 -6
  20. data/examples/i18n/et/features/step_definitions/kalkulaator_steps.rb +1 -1
  21. data/examples/i18n/fi/features/step_definitons/laskin_steps.rb +1 -1
  22. data/examples/i18n/fi/features/yhteenlasku.feature +2 -2
  23. data/examples/i18n/fr/features/addition.feature +2 -2
  24. data/examples/i18n/fr/features/step_definitions/calculatrice_steps.rb +1 -1
  25. data/examples/i18n/id/features/addition.feature +6 -6
  26. data/examples/i18n/id/features/step_definitons/calculator_steps.rb +2 -2
  27. data/examples/i18n/it/features/step_definitons/calcolatrice_steps.rb +1 -1
  28. data/examples/i18n/ja/features/step_definitons/calculator_steps.rb +2 -3
  29. data/examples/i18n/ko/features/step_definitons/calculator_steps.rb +1 -1
  30. data/examples/i18n/lt/features/addition.feature +7 -6
  31. data/examples/i18n/lt/features/step_definitons/calculator_steps.rb +2 -2
  32. data/examples/i18n/no/features/step_definitons/kalkulator_steps.rb +7 -7
  33. data/examples/i18n/no/features/summering.feature +1 -0
  34. data/examples/i18n/pt/features/step_definitions/calculadora_steps.rb +1 -1
  35. data/examples/i18n/ro/features/step_definitons/calculator_steps.rb +1 -1
  36. data/examples/i18n/se/features/step_definitons/kalkulator_steps.rb +1 -1
  37. data/examples/i18n/zh-CN/features/step_definitons/calculator_steps.rb +2 -2
  38. data/examples/java/src/cucumber/demo/Hello.java +16 -0
  39. data/examples/jbehave/README.textile +17 -0
  40. data/examples/jbehave/features/support/env.rb +7 -0
  41. data/examples/jbehave/features/trading.feature +24 -0
  42. data/examples/jbehave/pom.xml +48 -0
  43. data/examples/jbehave/src/main/java/cukes/jbehave/examples/trader/converters/TraderConverter.java +32 -0
  44. data/examples/jbehave/src/main/java/cukes/jbehave/examples/trader/model/Stock.java +42 -0
  45. data/examples/jbehave/src/main/java/cukes/jbehave/examples/trader/model/Trader.java +29 -0
  46. data/examples/jbehave/src/main/java/cukes/jbehave/examples/trader/persistence/TraderPersister.java +22 -0
  47. data/examples/jbehave/src/main/java/cukes/jbehave/examples/trader/scenarios/TraderSteps.java +65 -0
  48. data/examples/self_test/README.textile +4 -1
  49. data/examples/{calculator_ruby_features → self_test}/Rakefile +3 -3
  50. data/examples/self_test/features/background/failing_background.feature +10 -0
  51. data/examples/self_test/features/background/failing_background_after_success.feature +11 -0
  52. data/examples/self_test/features/background/multiline_args_background.feature +32 -0
  53. data/examples/self_test/features/background/passing_background.feature +10 -0
  54. data/examples/self_test/features/background/pending_background.feature +10 -0
  55. data/examples/self_test/features/background/scenario_outline_failing_background.feature +16 -0
  56. data/examples/self_test/features/background/scenario_outline_passing_background.feature +16 -0
  57. data/examples/self_test/features/call_undefined_step_from_step_def.feature +7 -0
  58. data/examples/self_test/features/lots_of_undefined.feature +8 -0
  59. data/examples/self_test/features/outline_sample.feature +11 -5
  60. data/examples/self_test/features/sample.feature +8 -3
  61. data/examples/self_test/features/step_definitions/sample_steps.rb +53 -4
  62. data/examples/self_test/features/support/env.rb +1 -0
  63. data/examples/self_test/features/support/tag_count_formatter.rb +25 -0
  64. data/examples/tickets/features/172.feature +28 -0
  65. data/examples/tickets/features/177/1.feature +29 -0
  66. data/examples/tickets/features/177/2.feature +21 -0
  67. data/examples/tickets/features/177/3.feature +18 -0
  68. data/examples/tickets/features/180.feature +7 -0
  69. data/examples/tickets/features/scenario_outline.feature +6 -1
  70. data/examples/tickets/features/step_definitons/tickets_steps.rb +27 -3
  71. data/examples/tickets/features/tickets.feature +4 -0
  72. data/features/background.feature +223 -0
  73. data/features/cucumber_cli.feature +218 -98
  74. data/features/cucumber_cli_outlines.feature +54 -37
  75. data/features/custom_formatter.feature +11 -0
  76. data/features/report_called_undefined_steps.feature +32 -0
  77. data/features/step_definitions/cucumber_steps.rb +7 -3
  78. data/features/step_definitions/extra_steps.rb +1 -1
  79. data/features/support/env.rb +2 -1
  80. data/gem_tasks/flog.rake +1 -1
  81. data/gem_tasks/gemspec.rake +2 -2
  82. data/gem_tasks/jar.rake +67 -0
  83. data/lib/autotest/cucumber_mixin.rb +17 -23
  84. data/lib/cucumber.rb +63 -11
  85. data/lib/cucumber/ast.rb +29 -0
  86. data/lib/cucumber/ast/background.rb +88 -0
  87. data/lib/cucumber/ast/comment.rb +26 -0
  88. data/lib/cucumber/ast/examples.rb +26 -0
  89. data/lib/cucumber/ast/feature.rb +66 -0
  90. data/lib/cucumber/ast/features.rb +39 -0
  91. data/lib/cucumber/ast/filter.rb +22 -0
  92. data/lib/cucumber/ast/outline_table.rb +49 -0
  93. data/lib/cucumber/ast/py_string.rb +52 -0
  94. data/lib/cucumber/ast/scenario.rb +103 -0
  95. data/lib/cucumber/ast/scenario_outline.rb +92 -0
  96. data/lib/cucumber/ast/step.rb +161 -0
  97. data/lib/cucumber/ast/steps.rb +13 -0
  98. data/lib/cucumber/ast/table.rb +218 -0
  99. data/lib/cucumber/ast/tags.rb +40 -0
  100. data/lib/cucumber/ast/visitor.rb +109 -0
  101. data/lib/cucumber/broadcaster.rb +1 -6
  102. data/lib/cucumber/cli/configuration.rb +339 -0
  103. data/lib/cucumber/cli/language_help_formatter.rb +59 -0
  104. data/lib/cucumber/cli/main.rb +100 -0
  105. data/lib/cucumber/core_ext/exception.rb +41 -8
  106. data/lib/cucumber/core_ext/instance_exec.rb +54 -0
  107. data/lib/cucumber/core_ext/proc.rb +29 -65
  108. data/lib/cucumber/core_ext/string.rb +19 -0
  109. data/lib/cucumber/formatter.rb +1 -0
  110. data/lib/cucumber/{formatters → formatter}/ansicolor.rb +14 -16
  111. data/lib/cucumber/formatter/color_io.rb +17 -0
  112. data/lib/cucumber/formatter/console.rb +119 -0
  113. data/lib/cucumber/formatter/cucumber.css +55 -0
  114. data/lib/cucumber/formatter/cucumber.sass +49 -0
  115. data/lib/cucumber/formatter/html.rb +121 -0
  116. data/lib/cucumber/formatter/pretty.rb +167 -0
  117. data/lib/cucumber/formatter/profile.rb +77 -0
  118. data/lib/cucumber/formatter/progress.rb +68 -0
  119. data/lib/cucumber/formatter/rerun.rb +35 -0
  120. data/lib/cucumber/formatter/unicode.rb +35 -0
  121. data/lib/cucumber/formatters/unicode.rb +2 -35
  122. data/lib/cucumber/jbehave.rb +102 -0
  123. data/lib/cucumber/languages.yml +128 -75
  124. data/lib/cucumber/parser.rb +43 -0
  125. data/lib/cucumber/parser/basic.rb +0 -0
  126. data/lib/cucumber/parser/feature.rb +1490 -0
  127. data/lib/cucumber/parser/feature.tt +188 -0
  128. data/lib/cucumber/parser/i18n.tt +31 -0
  129. data/lib/cucumber/parser/table.rb +402 -0
  130. data/lib/cucumber/parser/table.tt +59 -0
  131. data/lib/cucumber/parser/treetop_ext.rb +75 -0
  132. data/lib/cucumber/platform.rb +3 -17
  133. data/lib/cucumber/rails/rspec.rb +5 -2
  134. data/lib/cucumber/step_definition.rb +87 -0
  135. data/lib/cucumber/step_mother.rb +151 -66
  136. data/lib/cucumber/version.rb +2 -2
  137. data/rails_generators/cucumber/USAGE +3 -2
  138. data/rails_generators/cucumber/cucumber_generator.rb +33 -23
  139. data/rails_generators/cucumber/templates/cucumber +2 -1
  140. data/rails_generators/cucumber/templates/cucumber.rake +6 -1
  141. data/rails_generators/cucumber/templates/env.rb +1 -1
  142. data/rails_generators/feature/USAGE +3 -0
  143. data/rails_generators/feature/feature_generator.rb +30 -6
  144. data/spec/cucumber/ast/background_spec.rb +58 -0
  145. data/spec/cucumber/ast/feature_factory.rb +54 -0
  146. data/spec/cucumber/ast/feature_spec.rb +60 -0
  147. data/spec/cucumber/ast/py_string_spec.rb +40 -0
  148. data/spec/cucumber/ast/scenario_outline_spec.rb +64 -0
  149. data/spec/cucumber/ast/scenario_spec.rb +82 -0
  150. data/spec/cucumber/ast/step_spec.rb +45 -0
  151. data/spec/cucumber/ast/table_spec.rb +81 -0
  152. data/spec/cucumber/ast/tags_spec.rb +23 -0
  153. data/spec/cucumber/broadcaster_spec.rb +4 -17
  154. data/spec/cucumber/cli/configuration_spec.rb +239 -0
  155. data/spec/cucumber/cli/main_spec.rb +164 -0
  156. data/spec/cucumber/core_ext/proc_spec.rb +27 -35
  157. data/spec/cucumber/core_ext/string_spec.rb +8 -0
  158. data/spec/cucumber/{formatters → formatter}/ansicolor_spec.rb +2 -2
  159. data/spec/cucumber/formatter/html/cucumber.css +37 -0
  160. data/spec/cucumber/formatter/html/cucumber.js +13 -0
  161. data/spec/cucumber/formatter/html/index.html +45 -0
  162. data/spec/cucumber/formatter/html/jquery-1.3.min.js +19 -0
  163. data/spec/cucumber/formatter/html/jquery.uitableedit.js +100 -0
  164. data/spec/cucumber/formatters/profile_formatter_spec.rb +17 -16
  165. data/spec/cucumber/parser/feature_parser_spec.rb +281 -0
  166. data/spec/cucumber/parser/table_parser_spec.rb +48 -0
  167. data/spec/cucumber/step_definition_spec.rb +62 -0
  168. data/spec/cucumber/step_mother_spec.rb +50 -51
  169. data/spec/cucumber/treetop_parser/empty_feature.feature +1 -1
  170. data/spec/cucumber/treetop_parser/scenario_outline.feature +1 -1
  171. data/spec/cucumber/treetop_parser/spaces.feature +3 -1
  172. data/spec/cucumber/treetop_parser/with_comments.feature +1 -1
  173. data/spec/cucumber/treetop_parser/with_tags.feature +18 -0
  174. data/spec/cucumber/world/pending_spec.rb +13 -12
  175. data/spec/spec_helper.rb +1 -1
  176. metadata +107 -79
  177. data/examples/calculator_ruby_features/features/addition.rb +0 -39
  178. data/examples/calculator_ruby_features/features/step_definitons/calculator_steps.rb +0 -43
  179. data/gem_tasks/treetop.rake +0 -41
  180. data/lib/cucumber/cli.rb +0 -355
  181. data/lib/cucumber/executor.rb +0 -205
  182. data/lib/cucumber/formatters.rb +0 -1
  183. data/lib/cucumber/formatters/autotest_formatter.rb +0 -23
  184. data/lib/cucumber/formatters/cucumber.css +0 -132
  185. data/lib/cucumber/formatters/cucumber.js +0 -11
  186. data/lib/cucumber/formatters/html_formatter.rb +0 -152
  187. data/lib/cucumber/formatters/jquery.js +0 -32
  188. data/lib/cucumber/formatters/pretty_formatter.rb +0 -285
  189. data/lib/cucumber/formatters/profile_formatter.rb +0 -92
  190. data/lib/cucumber/formatters/progress_formatter.rb +0 -61
  191. data/lib/cucumber/model.rb +0 -1
  192. data/lib/cucumber/model/table.rb +0 -32
  193. data/lib/cucumber/step_methods.rb +0 -49
  194. data/lib/cucumber/tree.rb +0 -16
  195. data/lib/cucumber/tree/feature.rb +0 -105
  196. data/lib/cucumber/tree/features.rb +0 -21
  197. data/lib/cucumber/tree/given_scenario.rb +0 -13
  198. data/lib/cucumber/tree/scenario.rb +0 -240
  199. data/lib/cucumber/tree/step.rb +0 -173
  200. data/lib/cucumber/tree/table.rb +0 -26
  201. data/lib/cucumber/tree/top_down_visitor.rb +0 -23
  202. data/lib/cucumber/treetop_parser/feature.treetop.erb +0 -254
  203. data/lib/cucumber/treetop_parser/feature_ar.rb +0 -1951
  204. data/lib/cucumber/treetop_parser/feature_cy.rb +0 -1951
  205. data/lib/cucumber/treetop_parser/feature_da.rb +0 -1951
  206. data/lib/cucumber/treetop_parser/feature_de.rb +0 -1951
  207. data/lib/cucumber/treetop_parser/feature_en-lol.rb +0 -1951
  208. data/lib/cucumber/treetop_parser/feature_en-tx.rb +0 -1951
  209. data/lib/cucumber/treetop_parser/feature_en.rb +0 -1951
  210. data/lib/cucumber/treetop_parser/feature_es.rb +0 -1951
  211. data/lib/cucumber/treetop_parser/feature_et.rb +0 -1951
  212. data/lib/cucumber/treetop_parser/feature_fi.rb +0 -1951
  213. data/lib/cucumber/treetop_parser/feature_fr.rb +0 -1951
  214. data/lib/cucumber/treetop_parser/feature_id.rb +0 -1951
  215. data/lib/cucumber/treetop_parser/feature_it.rb +0 -1951
  216. data/lib/cucumber/treetop_parser/feature_ja.rb +0 -1951
  217. data/lib/cucumber/treetop_parser/feature_ko.rb +0 -1951
  218. data/lib/cucumber/treetop_parser/feature_lt.rb +0 -1951
  219. data/lib/cucumber/treetop_parser/feature_nl.rb +0 -1951
  220. data/lib/cucumber/treetop_parser/feature_no.rb +0 -1951
  221. data/lib/cucumber/treetop_parser/feature_parser.rb +0 -36
  222. data/lib/cucumber/treetop_parser/feature_pl.rb +0 -1951
  223. data/lib/cucumber/treetop_parser/feature_pt.rb +0 -1951
  224. data/lib/cucumber/treetop_parser/feature_ro.rb +0 -1951
  225. data/lib/cucumber/treetop_parser/feature_ro2.rb +0 -1951
  226. data/lib/cucumber/treetop_parser/feature_ru.rb +0 -1951
  227. data/lib/cucumber/treetop_parser/feature_se.rb +0 -1951
  228. data/lib/cucumber/treetop_parser/feature_zh-CN.rb +0 -1951
  229. data/lib/cucumber/world.rb +0 -1
  230. data/lib/cucumber/world/pending.rb +0 -22
  231. data/setup.rb +0 -1585
  232. data/spec/cucumber/cli_spec.rb +0 -521
  233. data/spec/cucumber/executor_spec.rb +0 -382
  234. data/spec/cucumber/formatters/autotest_formatter_spec.rb +0 -26
  235. data/spec/cucumber/formatters/features.html +0 -269
  236. data/spec/cucumber/formatters/html_formatter_spec.rb +0 -110
  237. data/spec/cucumber/formatters/pretty_formatter_spec.rb +0 -410
  238. data/spec/cucumber/formatters/progress_formatter_spec.rb +0 -81
  239. data/spec/cucumber/model/table_spec.rb +0 -32
  240. data/spec/cucumber/tree/feature_spec.rb +0 -122
  241. data/spec/cucumber/tree/row_scenario_outline_spec.rb +0 -73
  242. data/spec/cucumber/tree/row_scenario_spec.rb +0 -55
  243. data/spec/cucumber/tree/row_step_outline_spec.rb +0 -38
  244. data/spec/cucumber/tree/scenario_outline_spec.rb +0 -50
  245. data/spec/cucumber/tree/scenario_spec.rb +0 -134
  246. data/spec/cucumber/tree/step_outline_spec.rb +0 -17
  247. data/spec/cucumber/tree/step_spec.rb +0 -59
  248. data/spec/cucumber/treetop_parser/feature_parser_spec.rb +0 -120
@@ -1,99 +1,100 @@
1
1
  Feature: Cucumber command line
2
2
  In order to write better software
3
3
  Developers should be able to execute requirements as tests
4
-
4
+
5
5
  Scenario: Run single scenario with missing step definition
6
- When I run cucumber -q features/sample.feature:3
7
- Then it should pass with
6
+ When I run cucumber -q features/sample.feature:5
7
+ Then it should pass with
8
8
  """
9
+ @one
9
10
  Feature: Sample
11
+
12
+ @two @three
10
13
  Scenario: Missing
11
14
  Given missing
12
15
 
13
-
14
16
  1 scenario
15
- 1 step pending (1 with no step definition)
16
-
17
+ 1 undefined step
18
+
17
19
  """
18
-
19
- Scenario: Run single failing scenario
20
- When I run cucumber -q features/sample.feature:12
20
+
21
+ Scenario: Fail with --strict
22
+ When I run cucumber -q features/sample.feature:5 --strict
21
23
  Then it should fail with
22
24
  """
25
+ @one
23
26
  Feature: Sample
24
- Scenario: Failing
25
- Given failing
26
- FAIL (RuntimeError)
27
- ./features/step_definitions/sample_steps.rb:5:in `Given /^failing$/'
28
- features/sample.feature:12:in `Given failing'
29
27
 
28
+ @two @three
29
+ Scenario: Missing
30
+ Given missing
31
+ Undefined step: "missing" (Cucumber::Undefined)
32
+ features/sample.feature:6:in `Given missing'
30
33
 
31
34
  1 scenario
32
- 1 step failed
35
+ 1 failed step
33
36
 
34
37
  """
35
38
 
36
- Scenario: Specify 2 line numbers
37
- When I run cucumber -q features/sample.feature:3:12
39
+ Scenario: Specify 2 line numbers where one is a tag
40
+ When I run cucumber -q features/sample.feature:5:14
38
41
  Then it should fail with
39
42
  """
43
+ @one
40
44
  Feature: Sample
45
+
46
+ @two @three
41
47
  Scenario: Missing
42
48
  Given missing
43
49
 
50
+ @four
44
51
  Scenario: Failing
45
52
  Given failing
53
+ \"\"\"
54
+ hello
55
+ \"\"\"
46
56
  FAIL (RuntimeError)
47
- ./features/step_definitions/sample_steps.rb:5:in `Given /^failing$/'
48
- features/sample.feature:12:in `Given failing'
49
-
57
+ ./features/step_definitions/sample_steps.rb:2:in `flunker'
58
+ ./features/step_definitions/sample_steps.rb:9:in `/^failing$/'
59
+ features/sample.feature:16:in `Given failing'
50
60
 
51
61
  2 scenarios
52
- 1 step failed
53
- 1 step pending (1 with no step definition)
62
+ 1 failed step
63
+ 1 undefined step
54
64
 
55
65
  """
56
66
 
57
-
58
67
  Scenario: Require missing step definition from elsewhere
59
- When I run cucumber -q -r ../../features/step_definitions/extra_steps.rb features/sample.feature:3
68
+ When I run cucumber -q -r ../../features/step_definitions/extra_steps.rb features/sample.feature:5
60
69
  Then it should pass with
61
70
  """
71
+ @one
62
72
  Feature: Sample
73
+
74
+ @two @three
63
75
  Scenario: Missing
64
76
  Given missing
65
77
 
66
-
67
- 1 scenario
68
- 1 step passed
69
-
70
- """
71
-
72
- Scenario: Specify the line number of a blank line
73
- When I run cucumber -q features/sample.feature:10
74
- Then it should pass with
75
- """
76
- Feature: Sample
77
- Scenario: Passing
78
- Given passing
79
-
80
-
81
78
  1 scenario
82
- 1 step passed
79
+ 1 passed step
83
80
 
84
81
  """
85
82
 
86
83
  Scenario: Specify the line number of a row
87
- When I run cucumber -q features/sample.feature:8
84
+ When I run cucumber -q features/sample.feature:12
88
85
  Then it should pass with
89
86
  """
87
+ @one
90
88
  Feature: Sample
89
+
90
+ @three
91
91
  Scenario: Passing
92
92
  Given passing
93
-
93
+ | a | b |
94
+ | c | d |
94
95
 
95
96
  1 scenario
96
- 1 step passed
97
+ 1 passed step
97
98
 
98
99
  """
99
100
 
@@ -101,19 +102,19 @@ Feature: Cucumber command line
101
102
  When I run cucumber -q --format progress features/sample.feature
102
103
  Then it should fail with
103
104
  """
104
- P.F
105
+ U.F
105
106
 
106
- Pending Scenarios:
107
-
108
- 1) Sample (Missing)
109
-
110
-
111
- Failed:
112
-
113
- 1)
114
- FAIL
115
- ./features/step_definitions/sample_steps.rb:5:in `Given /^failing$/'
116
- features/sample.feature:12:in `Given failing'
107
+ (::) failed steps (::)
108
+
109
+ FAIL (RuntimeError)
110
+ ./features/step_definitions/sample_steps.rb:2:in `flunker'
111
+ ./features/step_definitions/sample_steps.rb:9:in `/^failing$/'
112
+ features/sample.feature:16:in `Given failing'
113
+
114
+ 3 scenarios
115
+ 1 failed step
116
+ 1 undefined step
117
+ 1 passed step
117
118
 
118
119
  """
119
120
 
@@ -126,12 +127,14 @@ Feature: Cucumber command line
126
127
  For å slippe å gjøre dumme feil
127
128
  Som en regnskapsfører
128
129
  Vil jeg kunne legge sammen
130
+
129
131
  Scenario: to tall
130
132
  Gitt at jeg har tastet inn 5
131
133
  Og at jeg har tastet inn 7
132
134
  Når jeg summerer
133
135
  Så skal resultatet være 12
134
136
 
137
+ @iterasjon3
135
138
  Scenario: tre tall
136
139
  Gitt at jeg har tastet inn 5
137
140
  Og at jeg har tastet inn 7
@@ -139,85 +142,202 @@ Feature: Cucumber command line
139
142
  Når jeg summerer
140
143
  Så skal resultatet være 13
141
144
 
142
-
143
145
  2 scenarios
144
- 9 steps passed
146
+ 9 passed steps
145
147
 
146
148
  """
147
149
 
148
150
  Scenario: --dry-run
149
- When I run cucumber --dry-run features
151
+ When I run cucumber --dry-run --no-snippets features/*.feature
150
152
  Then it should pass with
151
153
  """
152
- Feature: Outline Sample # features/outline_sample.feature
153
- Scenario Outline: Test state # features/outline_sample.feature:3
154
- Given <state> without a table # features/outline_sample.feature:4
154
+ Feature: Calling undefined step
155
+
156
+ Scenario: Call directly
157
+ Given a step definition that calls an undefined step
158
+
159
+ Scenario: Call via another
160
+ Given call step "a step definition that calls an undefined step"
161
+
162
+ Feature: Lots of undefined
163
+
164
+ Scenario: Implement me
165
+ Given it snows in Sahara
166
+ Given it's 40 degrees in Norway
167
+ And it's 40 degrees in Norway
168
+ When I stop procrastinating
169
+ And there is world peace
170
+
171
+ Feature: Outline Sample
155
172
 
156
- |state |
157
- |missing|
158
- |passing|
159
- |failing|
173
+ Scenario: I have no steps
160
174
 
161
- Feature: Sample # features/sample.feature
175
+ Scenario Outline: Test state
176
+ Given <state> without a table
177
+ Given <other_state> without a table
162
178
 
163
- Scenario: Missing # features/sample.feature:3
164
- Given missing # other.rb:23
179
+ Examples: Rainbow colours
180
+ | state | other_state |
181
+ | missing | passing |
182
+ | passing | passing |
183
+ | failing | passing |
165
184
 
166
- Scenario: Passing # features/sample.feature:6
167
- Given passing # features/step_definitions/sample_steps.rb:1
185
+ Examples: Only passing
186
+ | state | other_state |
187
+ | passing | passing |
168
188
 
169
- Scenario: Failing # features/sample.feature:11
170
- Given failing # features/step_definitions/sample_steps.rb:4
189
+ @one
190
+ Feature: Sample
171
191
 
192
+ @two @three
193
+ Scenario: Missing
194
+ Given missing
172
195
 
173
- 7 scenarios
174
- 6 steps passed
196
+ @three
197
+ Scenario: Passing
198
+ Given passing
199
+ | a | b |
200
+ | c | d |
201
+
202
+ @four
203
+ Scenario: Failing
204
+ Given failing
205
+ \"\"\"
206
+ hello
207
+ \"\"\"
208
+
209
+ 11 scenarios
210
+ 11 skipped steps
211
+ 7 undefined steps
175
212
 
176
213
  """
177
214
 
178
215
  Scenario: Multiple formatters and outputs
179
- When I run cucumber --format progress --out tmp/progress.txt --format html --out tmp/features.html features
180
- Then it should fail with
216
+ When I run cucumber --format progress --out tmp/progress.txt --format pretty --out tmp/pretty.txt --dry-run features/lots_of_undefined.feature
217
+ And examples/self_test/tmp/progress.txt should contain
181
218
  """
219
+ UUUUU
220
+
221
+ 1 scenario
222
+ 5 undefined steps
223
+
182
224
  """
183
- And examples/self_test/tmp/progress.txt should contain
225
+ And examples/self_test/tmp/pretty.txt should match
184
226
  """
185
- P.FP.F
227
+ Feature: Lots of undefined
186
228
 
187
- Pending Scenarios:
229
+ Scenario: Implement me
230
+ Given it snows in Sahara
231
+ Given it's 40 degrees in Norway
232
+ And it's 40 degrees in Norway
233
+ When I stop procrastinating
234
+ And there is world peace
188
235
 
189
- 1) Outline Sample (Test state)
190
- 2) Sample (Missing)
236
+ 1 scenario
237
+ 5 undefined steps
191
238
 
239
+ """
192
240
 
193
- Failed:
241
+ Scenario: Run scenario specified by name using --scenario
242
+ When I run cucumber --scenario Passing -q features
243
+ Then it should pass with
244
+ """
245
+ @one
246
+ Feature: Sample
194
247
 
195
- 1)
196
- FAIL
197
- ./features/step_definitions/sample_steps.rb:12:in ` /^failing without a table$/'
198
- features/outline_sample.feature:9:in `/^failing without a table$/'
248
+ @three
249
+ Scenario: Passing
250
+ Given passing
251
+ | a | b |
252
+ | c | d |
199
253
 
200
- 2)
201
- FAIL
202
- ./features/step_definitions/sample_steps.rb:5:in `Given /^failing$/'
203
- features/sample.feature:12:in `Given failing'
254
+ 1 scenario
255
+ 1 passed step
204
256
 
205
257
  """
206
- And examples/self_test/tmp/features.html should match
258
+
259
+ Scenario: Run with a tag that exists on 2 scenarios
260
+ When I run cucumber -q features --tags three
261
+ Then it should pass with
207
262
  """
208
- Given passing
263
+ @one
264
+ Feature: Sample
265
+
266
+ @two @three
267
+ Scenario: Missing
268
+ Given missing
269
+
270
+ @three
271
+ Scenario: Passing
272
+ Given passing
273
+ | a | b |
274
+ | c | d |
275
+
276
+ 2 scenarios
277
+ 1 undefined step
278
+ 1 passed step
279
+
209
280
  """
210
-
211
- Scenario: Run scenario specified by name using --scenario
212
- When I run cucumber --scenario Passing -q features/sample.feature
213
- Then it should pass with
281
+
282
+ Scenario: Run with a tag that exists on 1 feature
283
+ When I run cucumber -q features --tags one
284
+ Then it should fail with
214
285
  """
286
+ @one
215
287
  Feature: Sample
288
+
289
+ @two @three
290
+ Scenario: Missing
291
+ Given missing
292
+
293
+ @three
216
294
  Scenario: Passing
217
295
  Given passing
296
+ | a | b |
297
+ | c | d |
218
298
 
299
+ @four
300
+ Scenario: Failing
301
+ Given failing
302
+ \"\"\"
303
+ hello
304
+ \"\"\"
305
+ FAIL (RuntimeError)
306
+ ./features/step_definitions/sample_steps.rb:2:in `flunker'
307
+ ./features/step_definitions/sample_steps.rb:9:in `/^failing$/'
308
+ features/sample.feature:16:in `Given failing'
219
309
 
220
- 1 scenario
221
- 1 step passed
310
+ 3 scenarios
311
+ 1 failed step
312
+ 1 undefined step
313
+ 1 passed step
314
+
315
+ """
222
316
 
317
+ Scenario: Reformat files with --autoformat
318
+ When I run cucumber --autoformat tmp/formatted features
319
+ Then examples/self_test/tmp/formatted/features/sample.feature should contain
223
320
  """
321
+ @one
322
+ Feature: Sample
323
+
324
+ @two @three
325
+ Scenario: Missing
326
+ Given missing
327
+
328
+ @three
329
+ Scenario: Passing
330
+ Given passing
331
+ | a | b |
332
+ | c | d |
333
+
334
+ @four
335
+ Scenario: Failing
336
+ Given failing
337
+ \"\"\"
338
+ hello
339
+ \"\"\"
340
+
341
+
342
+ """
343
+
@@ -1,54 +1,65 @@
1
1
  Feature: Cucumber command line
2
2
  In order to write better software
3
3
  Developers should be able to execute requirements as tests
4
-
4
+
5
5
  Scenario: Run scenario outline steps only
6
- When I run cucumber -q features/outline_sample.feature:3
7
- Then it should pass with
6
+ When I run cucumber -q features/outline_sample.feature:7
7
+ Then it should fail with
8
8
  """
9
9
  Feature: Outline Sample
10
+
10
11
  Scenario Outline: Test state
11
12
  Given <state> without a table
13
+ Given <other_state> without a table
12
14
 
13
- |state |
15
+ Examples: Rainbow colours
16
+ | state | other_state |
17
+ | missing | passing |
18
+ | passing | passing |
19
+ | failing | passing |
20
+ FAIL (RuntimeError)
21
+ ./features/step_definitions/sample_steps.rb:2:in `flunker'
22
+ ./features/step_definitions/sample_steps.rb:16:in `/^failing without a table$/'
23
+ features/outline_sample.feature:12:in `Given failing without a table'
14
24
 
15
- 1 scenario
16
-
17
- """
18
-
19
- Scenario: Run single scenario outline table row with missing step definition
20
- When I run cucumber -q features/outline_sample.feature:7
21
- Then it should pass with
22
- """
23
- Feature: Outline Sample
24
- Scenario Outline: Test state
25
- Given <state> without a table
25
+ Examples: Only passing
26
+ | state | other_state |
27
+ | passing | passing |
26
28
 
27
- |state |
28
- |missing|
29
+ 4 scenarios
30
+ 1 failed step
31
+ 2 skipped steps
32
+ 1 undefined step
33
+ 4 passed steps
29
34
 
30
- 2 scenarios
31
- 1 step pending (1 with no step definition)
32
-
33
35
  """
34
36
 
37
+ # The "Only Passing" should not be printed
38
+ @buggy
35
39
  Scenario: Run single failing scenario outline table row
36
- When I run cucumber -q features/outline_sample.feature:9
40
+ When I run cucumber features/outline_sample.feature:12
37
41
  Then it should fail with
38
42
  """
39
43
  Feature: Outline Sample
40
- Scenario Outline: Test state
41
- Given <state> without a table
42
44
 
43
- |state |
44
- |failing|
45
+ Scenario Outline: Test state # features/outline_sample.feature:5
46
+ Given <state> without a table # features/step_definitions/sample_steps.rb:12
47
+ Given <other_state> without a table # features/step_definitions/sample_steps.rb:12
45
48
 
49
+ Examples: Rainbow colours
50
+ | state | other_state |
51
+ | failing | passing |
46
52
  FAIL (RuntimeError)
47
- ./features/step_definitions/sample_steps.rb:12:in ` /^failing without a table$/'
48
- features/outline_sample.feature:9:in `/^failing without a table$/'
53
+ ./features/step_definitions/sample_steps.rb:2:in `flunker'
54
+ ./features/step_definitions/sample_steps.rb:16:in `/^failing without a table$/'
55
+ features/outline_sample.feature:12:in `Given failing without a table'
56
+
57
+ Examples: Only passing
58
+ | state | other_state |
49
59
 
50
- 2 scenarios
51
- 1 step failed
60
+ 1 scenario
61
+ 1 failed step
62
+ 1 skipped step
52
63
 
53
64
  """
54
65
 
@@ -56,18 +67,24 @@ Feature: Cucumber command line
56
67
  When I run cucumber -q --format progress features/outline_sample.feature
57
68
  Then it should fail with
58
69
  """
59
- P.F
70
+ UUS..FS..
60
71
 
61
- Pending Scenarios:
72
+ (::) undefined scenarios (::)
62
73
 
63
- 1) Outline Sample (Test state)
74
+ features/outline_sample.feature:3:in `Scenario: I have no steps'
64
75
 
76
+ (::) failed steps (::)
65
77
 
66
- Failed:
78
+ FAIL (RuntimeError)
79
+ ./features/step_definitions/sample_steps.rb:2:in `flunker'
80
+ ./features/step_definitions/sample_steps.rb:16:in `/^failing without a table$/'
81
+ features/outline_sample.feature:12:in `Given failing without a table'
67
82
 
68
- 1)
69
- FAIL
70
- ./features/step_definitions/sample_steps.rb:12:in ` /^failing without a table$/'
71
- features/outline_sample.feature:9:in `/^failing without a table$/'
83
+ 5 scenarios
84
+ 1 failed step
85
+ 2 skipped steps
86
+ 1 undefined step
87
+ 4 passed steps
72
88
 
73
89
  """
90
+