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.
- data/History.txt +126 -2
- data/License.txt +1 -1
- data/Manifest.txt +0 -270
- data/Rakefile +1 -1
- data/bin/cucumber +2 -2
- data/config/hoe.rb +7 -2
- data/examples/cs/features/step_definitons/calculator_steps.rb +1 -1
- data/examples/i18n/README.textile +1 -1
- data/examples/i18n/Rakefile +3 -3
- data/examples/i18n/ar/features/step_definitons/calculator_steps.rb +1 -6
- data/examples/i18n/da/features/step_definitons/kalkulator_steps.rb +1 -1
- data/examples/i18n/de/features/addition.feature +6 -6
- data/examples/i18n/de/features/step_definitons/calculator_steps.rb +2 -2
- data/examples/i18n/en/features/addition.feature +6 -6
- data/examples/i18n/en/features/step_definitons/calculator_steps.rb +2 -2
- data/examples/i18n/es/features/adicion.feature +11 -12
- data/examples/i18n/es/features/step_definitons/calculador_steps.rb +7 -10
- data/examples/i18n/es/lib/calculador.rb +4 -1
- data/examples/i18n/et/features/liitmine.feature +7 -6
- data/examples/i18n/et/features/step_definitions/kalkulaator_steps.rb +1 -1
- data/examples/i18n/fi/features/step_definitons/laskin_steps.rb +1 -1
- data/examples/i18n/fi/features/yhteenlasku.feature +2 -2
- data/examples/i18n/fr/features/addition.feature +2 -2
- data/examples/i18n/fr/features/step_definitions/calculatrice_steps.rb +1 -1
- data/examples/i18n/id/features/addition.feature +6 -6
- data/examples/i18n/id/features/step_definitons/calculator_steps.rb +2 -2
- data/examples/i18n/it/features/step_definitons/calcolatrice_steps.rb +1 -1
- data/examples/i18n/ja/features/step_definitons/calculator_steps.rb +2 -3
- data/examples/i18n/ko/features/step_definitons/calculator_steps.rb +1 -1
- data/examples/i18n/lt/features/addition.feature +7 -6
- data/examples/i18n/lt/features/step_definitons/calculator_steps.rb +2 -2
- data/examples/i18n/no/features/step_definitons/kalkulator_steps.rb +7 -7
- data/examples/i18n/no/features/summering.feature +1 -0
- data/examples/i18n/pt/features/step_definitions/calculadora_steps.rb +1 -1
- data/examples/i18n/ro/features/step_definitons/calculator_steps.rb +1 -1
- data/examples/i18n/se/features/step_definitons/kalkulator_steps.rb +1 -1
- data/examples/i18n/zh-CN/features/step_definitons/calculator_steps.rb +2 -2
- data/examples/java/src/cucumber/demo/Hello.java +16 -0
- data/examples/jbehave/README.textile +17 -0
- data/examples/jbehave/features/support/env.rb +7 -0
- data/examples/jbehave/features/trading.feature +24 -0
- data/examples/jbehave/pom.xml +48 -0
- data/examples/jbehave/src/main/java/cukes/jbehave/examples/trader/converters/TraderConverter.java +32 -0
- data/examples/jbehave/src/main/java/cukes/jbehave/examples/trader/model/Stock.java +42 -0
- data/examples/jbehave/src/main/java/cukes/jbehave/examples/trader/model/Trader.java +29 -0
- data/examples/jbehave/src/main/java/cukes/jbehave/examples/trader/persistence/TraderPersister.java +22 -0
- data/examples/jbehave/src/main/java/cukes/jbehave/examples/trader/scenarios/TraderSteps.java +65 -0
- data/examples/self_test/README.textile +4 -1
- data/examples/{calculator_ruby_features → self_test}/Rakefile +3 -3
- data/examples/self_test/features/background/failing_background.feature +10 -0
- data/examples/self_test/features/background/failing_background_after_success.feature +11 -0
- data/examples/self_test/features/background/multiline_args_background.feature +32 -0
- data/examples/self_test/features/background/passing_background.feature +10 -0
- data/examples/self_test/features/background/pending_background.feature +10 -0
- data/examples/self_test/features/background/scenario_outline_failing_background.feature +16 -0
- data/examples/self_test/features/background/scenario_outline_passing_background.feature +16 -0
- data/examples/self_test/features/call_undefined_step_from_step_def.feature +7 -0
- data/examples/self_test/features/lots_of_undefined.feature +8 -0
- data/examples/self_test/features/outline_sample.feature +11 -5
- data/examples/self_test/features/sample.feature +8 -3
- data/examples/self_test/features/step_definitions/sample_steps.rb +53 -4
- data/examples/self_test/features/support/env.rb +1 -0
- data/examples/self_test/features/support/tag_count_formatter.rb +25 -0
- data/examples/tickets/features/172.feature +28 -0
- data/examples/tickets/features/177/1.feature +29 -0
- data/examples/tickets/features/177/2.feature +21 -0
- data/examples/tickets/features/177/3.feature +18 -0
- data/examples/tickets/features/180.feature +7 -0
- data/examples/tickets/features/scenario_outline.feature +6 -1
- data/examples/tickets/features/step_definitons/tickets_steps.rb +27 -3
- data/examples/tickets/features/tickets.feature +4 -0
- data/features/background.feature +223 -0
- data/features/cucumber_cli.feature +218 -98
- data/features/cucumber_cli_outlines.feature +54 -37
- data/features/custom_formatter.feature +11 -0
- data/features/report_called_undefined_steps.feature +32 -0
- data/features/step_definitions/cucumber_steps.rb +7 -3
- data/features/step_definitions/extra_steps.rb +1 -1
- data/features/support/env.rb +2 -1
- data/gem_tasks/flog.rake +1 -1
- data/gem_tasks/gemspec.rake +2 -2
- data/gem_tasks/jar.rake +67 -0
- data/lib/autotest/cucumber_mixin.rb +17 -23
- data/lib/cucumber.rb +63 -11
- data/lib/cucumber/ast.rb +29 -0
- data/lib/cucumber/ast/background.rb +88 -0
- data/lib/cucumber/ast/comment.rb +26 -0
- data/lib/cucumber/ast/examples.rb +26 -0
- data/lib/cucumber/ast/feature.rb +66 -0
- data/lib/cucumber/ast/features.rb +39 -0
- data/lib/cucumber/ast/filter.rb +22 -0
- data/lib/cucumber/ast/outline_table.rb +49 -0
- data/lib/cucumber/ast/py_string.rb +52 -0
- data/lib/cucumber/ast/scenario.rb +103 -0
- data/lib/cucumber/ast/scenario_outline.rb +92 -0
- data/lib/cucumber/ast/step.rb +161 -0
- data/lib/cucumber/ast/steps.rb +13 -0
- data/lib/cucumber/ast/table.rb +218 -0
- data/lib/cucumber/ast/tags.rb +40 -0
- data/lib/cucumber/ast/visitor.rb +109 -0
- data/lib/cucumber/broadcaster.rb +1 -6
- data/lib/cucumber/cli/configuration.rb +339 -0
- data/lib/cucumber/cli/language_help_formatter.rb +59 -0
- data/lib/cucumber/cli/main.rb +100 -0
- data/lib/cucumber/core_ext/exception.rb +41 -8
- data/lib/cucumber/core_ext/instance_exec.rb +54 -0
- data/lib/cucumber/core_ext/proc.rb +29 -65
- data/lib/cucumber/core_ext/string.rb +19 -0
- data/lib/cucumber/formatter.rb +1 -0
- data/lib/cucumber/{formatters → formatter}/ansicolor.rb +14 -16
- data/lib/cucumber/formatter/color_io.rb +17 -0
- data/lib/cucumber/formatter/console.rb +119 -0
- data/lib/cucumber/formatter/cucumber.css +55 -0
- data/lib/cucumber/formatter/cucumber.sass +49 -0
- data/lib/cucumber/formatter/html.rb +121 -0
- data/lib/cucumber/formatter/pretty.rb +167 -0
- data/lib/cucumber/formatter/profile.rb +77 -0
- data/lib/cucumber/formatter/progress.rb +68 -0
- data/lib/cucumber/formatter/rerun.rb +35 -0
- data/lib/cucumber/formatter/unicode.rb +35 -0
- data/lib/cucumber/formatters/unicode.rb +2 -35
- data/lib/cucumber/jbehave.rb +102 -0
- data/lib/cucumber/languages.yml +128 -75
- data/lib/cucumber/parser.rb +43 -0
- data/lib/cucumber/parser/basic.rb +0 -0
- data/lib/cucumber/parser/feature.rb +1490 -0
- data/lib/cucumber/parser/feature.tt +188 -0
- data/lib/cucumber/parser/i18n.tt +31 -0
- data/lib/cucumber/parser/table.rb +402 -0
- data/lib/cucumber/parser/table.tt +59 -0
- data/lib/cucumber/parser/treetop_ext.rb +75 -0
- data/lib/cucumber/platform.rb +3 -17
- data/lib/cucumber/rails/rspec.rb +5 -2
- data/lib/cucumber/step_definition.rb +87 -0
- data/lib/cucumber/step_mother.rb +151 -66
- data/lib/cucumber/version.rb +2 -2
- data/rails_generators/cucumber/USAGE +3 -2
- data/rails_generators/cucumber/cucumber_generator.rb +33 -23
- data/rails_generators/cucumber/templates/cucumber +2 -1
- data/rails_generators/cucumber/templates/cucumber.rake +6 -1
- data/rails_generators/cucumber/templates/env.rb +1 -1
- data/rails_generators/feature/USAGE +3 -0
- data/rails_generators/feature/feature_generator.rb +30 -6
- data/spec/cucumber/ast/background_spec.rb +58 -0
- data/spec/cucumber/ast/feature_factory.rb +54 -0
- data/spec/cucumber/ast/feature_spec.rb +60 -0
- data/spec/cucumber/ast/py_string_spec.rb +40 -0
- data/spec/cucumber/ast/scenario_outline_spec.rb +64 -0
- data/spec/cucumber/ast/scenario_spec.rb +82 -0
- data/spec/cucumber/ast/step_spec.rb +45 -0
- data/spec/cucumber/ast/table_spec.rb +81 -0
- data/spec/cucumber/ast/tags_spec.rb +23 -0
- data/spec/cucumber/broadcaster_spec.rb +4 -17
- data/spec/cucumber/cli/configuration_spec.rb +239 -0
- data/spec/cucumber/cli/main_spec.rb +164 -0
- data/spec/cucumber/core_ext/proc_spec.rb +27 -35
- data/spec/cucumber/core_ext/string_spec.rb +8 -0
- data/spec/cucumber/{formatters → formatter}/ansicolor_spec.rb +2 -2
- data/spec/cucumber/formatter/html/cucumber.css +37 -0
- data/spec/cucumber/formatter/html/cucumber.js +13 -0
- data/spec/cucumber/formatter/html/index.html +45 -0
- data/spec/cucumber/formatter/html/jquery-1.3.min.js +19 -0
- data/spec/cucumber/formatter/html/jquery.uitableedit.js +100 -0
- data/spec/cucumber/formatters/profile_formatter_spec.rb +17 -16
- data/spec/cucumber/parser/feature_parser_spec.rb +281 -0
- data/spec/cucumber/parser/table_parser_spec.rb +48 -0
- data/spec/cucumber/step_definition_spec.rb +62 -0
- data/spec/cucumber/step_mother_spec.rb +50 -51
- data/spec/cucumber/treetop_parser/empty_feature.feature +1 -1
- data/spec/cucumber/treetop_parser/scenario_outline.feature +1 -1
- data/spec/cucumber/treetop_parser/spaces.feature +3 -1
- data/spec/cucumber/treetop_parser/with_comments.feature +1 -1
- data/spec/cucumber/treetop_parser/with_tags.feature +18 -0
- data/spec/cucumber/world/pending_spec.rb +13 -12
- data/spec/spec_helper.rb +1 -1
- metadata +107 -79
- data/examples/calculator_ruby_features/features/addition.rb +0 -39
- data/examples/calculator_ruby_features/features/step_definitons/calculator_steps.rb +0 -43
- data/gem_tasks/treetop.rake +0 -41
- data/lib/cucumber/cli.rb +0 -355
- data/lib/cucumber/executor.rb +0 -205
- data/lib/cucumber/formatters.rb +0 -1
- data/lib/cucumber/formatters/autotest_formatter.rb +0 -23
- data/lib/cucumber/formatters/cucumber.css +0 -132
- data/lib/cucumber/formatters/cucumber.js +0 -11
- data/lib/cucumber/formatters/html_formatter.rb +0 -152
- data/lib/cucumber/formatters/jquery.js +0 -32
- data/lib/cucumber/formatters/pretty_formatter.rb +0 -285
- data/lib/cucumber/formatters/profile_formatter.rb +0 -92
- data/lib/cucumber/formatters/progress_formatter.rb +0 -61
- data/lib/cucumber/model.rb +0 -1
- data/lib/cucumber/model/table.rb +0 -32
- data/lib/cucumber/step_methods.rb +0 -49
- data/lib/cucumber/tree.rb +0 -16
- data/lib/cucumber/tree/feature.rb +0 -105
- data/lib/cucumber/tree/features.rb +0 -21
- data/lib/cucumber/tree/given_scenario.rb +0 -13
- data/lib/cucumber/tree/scenario.rb +0 -240
- data/lib/cucumber/tree/step.rb +0 -173
- data/lib/cucumber/tree/table.rb +0 -26
- data/lib/cucumber/tree/top_down_visitor.rb +0 -23
- data/lib/cucumber/treetop_parser/feature.treetop.erb +0 -254
- data/lib/cucumber/treetop_parser/feature_ar.rb +0 -1951
- data/lib/cucumber/treetop_parser/feature_cy.rb +0 -1951
- data/lib/cucumber/treetop_parser/feature_da.rb +0 -1951
- data/lib/cucumber/treetop_parser/feature_de.rb +0 -1951
- data/lib/cucumber/treetop_parser/feature_en-lol.rb +0 -1951
- data/lib/cucumber/treetop_parser/feature_en-tx.rb +0 -1951
- data/lib/cucumber/treetop_parser/feature_en.rb +0 -1951
- data/lib/cucumber/treetop_parser/feature_es.rb +0 -1951
- data/lib/cucumber/treetop_parser/feature_et.rb +0 -1951
- data/lib/cucumber/treetop_parser/feature_fi.rb +0 -1951
- data/lib/cucumber/treetop_parser/feature_fr.rb +0 -1951
- data/lib/cucumber/treetop_parser/feature_id.rb +0 -1951
- data/lib/cucumber/treetop_parser/feature_it.rb +0 -1951
- data/lib/cucumber/treetop_parser/feature_ja.rb +0 -1951
- data/lib/cucumber/treetop_parser/feature_ko.rb +0 -1951
- data/lib/cucumber/treetop_parser/feature_lt.rb +0 -1951
- data/lib/cucumber/treetop_parser/feature_nl.rb +0 -1951
- data/lib/cucumber/treetop_parser/feature_no.rb +0 -1951
- data/lib/cucumber/treetop_parser/feature_parser.rb +0 -36
- data/lib/cucumber/treetop_parser/feature_pl.rb +0 -1951
- data/lib/cucumber/treetop_parser/feature_pt.rb +0 -1951
- data/lib/cucumber/treetop_parser/feature_ro.rb +0 -1951
- data/lib/cucumber/treetop_parser/feature_ro2.rb +0 -1951
- data/lib/cucumber/treetop_parser/feature_ru.rb +0 -1951
- data/lib/cucumber/treetop_parser/feature_se.rb +0 -1951
- data/lib/cucumber/treetop_parser/feature_zh-CN.rb +0 -1951
- data/lib/cucumber/world.rb +0 -1
- data/lib/cucumber/world/pending.rb +0 -22
- data/setup.rb +0 -1585
- data/spec/cucumber/cli_spec.rb +0 -521
- data/spec/cucumber/executor_spec.rb +0 -382
- data/spec/cucumber/formatters/autotest_formatter_spec.rb +0 -26
- data/spec/cucumber/formatters/features.html +0 -269
- data/spec/cucumber/formatters/html_formatter_spec.rb +0 -110
- data/spec/cucumber/formatters/pretty_formatter_spec.rb +0 -410
- data/spec/cucumber/formatters/progress_formatter_spec.rb +0 -81
- data/spec/cucumber/model/table_spec.rb +0 -32
- data/spec/cucumber/tree/feature_spec.rb +0 -122
- data/spec/cucumber/tree/row_scenario_outline_spec.rb +0 -73
- data/spec/cucumber/tree/row_scenario_spec.rb +0 -55
- data/spec/cucumber/tree/row_step_outline_spec.rb +0 -38
- data/spec/cucumber/tree/scenario_outline_spec.rb +0 -50
- data/spec/cucumber/tree/scenario_spec.rb +0 -134
- data/spec/cucumber/tree/step_outline_spec.rb +0 -17
- data/spec/cucumber/tree/step_spec.rb +0 -59
- 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:
|
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
|
16
|
-
|
17
|
+
1 undefined step
|
18
|
+
|
17
19
|
"""
|
18
|
-
|
19
|
-
Scenario:
|
20
|
-
When I run cucumber -q features/sample.feature:
|
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
|
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:
|
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:
|
48
|
-
features/
|
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
|
53
|
-
1
|
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:
|
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
|
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:
|
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
|
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
|
-
|
105
|
+
U.F
|
105
106
|
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
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
|
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:
|
153
|
-
|
154
|
-
|
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
|
-
|
157
|
-
|missing|
|
158
|
-
|passing|
|
159
|
-
|failing|
|
173
|
+
Scenario: I have no steps
|
160
174
|
|
161
|
-
|
175
|
+
Scenario Outline: Test state
|
176
|
+
Given <state> without a table
|
177
|
+
Given <other_state> without a table
|
162
178
|
|
163
|
-
|
164
|
-
|
179
|
+
Examples: Rainbow colours
|
180
|
+
| state | other_state |
|
181
|
+
| missing | passing |
|
182
|
+
| passing | passing |
|
183
|
+
| failing | passing |
|
165
184
|
|
166
|
-
|
167
|
-
|
185
|
+
Examples: Only passing
|
186
|
+
| state | other_state |
|
187
|
+
| passing | passing |
|
168
188
|
|
169
|
-
|
170
|
-
|
189
|
+
@one
|
190
|
+
Feature: Sample
|
171
191
|
|
192
|
+
@two @three
|
193
|
+
Scenario: Missing
|
194
|
+
Given missing
|
172
195
|
|
173
|
-
|
174
|
-
|
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
|
180
|
-
|
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/
|
225
|
+
And examples/self_test/tmp/pretty.txt should match
|
184
226
|
"""
|
185
|
-
|
227
|
+
Feature: Lots of undefined
|
186
228
|
|
187
|
-
|
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
|
190
|
-
|
236
|
+
1 scenario
|
237
|
+
5 undefined steps
|
191
238
|
|
239
|
+
"""
|
192
240
|
|
193
|
-
|
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
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
248
|
+
@three
|
249
|
+
Scenario: Passing
|
250
|
+
Given passing
|
251
|
+
| a | b |
|
252
|
+
| c | d |
|
199
253
|
|
200
|
-
|
201
|
-
|
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
|
-
|
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
|
-
|
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
|
212
|
-
When I run cucumber
|
213
|
-
Then it should
|
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
|
-
|
221
|
-
1 step
|
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:
|
7
|
-
Then it should
|
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
|
-
|
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
|
-
|
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
|
-
|
28
|
-
|
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
|
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
|
-
|
44
|
-
|
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:
|
48
|
-
features/
|
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
|
-
|
51
|
-
1 step
|
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
|
-
|
70
|
+
UUS..FS..
|
60
71
|
|
61
|
-
|
72
|
+
(::) undefined scenarios (::)
|
62
73
|
|
63
|
-
|
74
|
+
features/outline_sample.feature:3:in `Scenario: I have no steps'
|
64
75
|
|
76
|
+
(::) failed steps (::)
|
65
77
|
|
66
|
-
|
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
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
83
|
+
5 scenarios
|
84
|
+
1 failed step
|
85
|
+
2 skipped steps
|
86
|
+
1 undefined step
|
87
|
+
4 passed steps
|
72
88
|
|
73
89
|
"""
|
90
|
+
|