cucumber 0.8.5 → 0.8.6
Sign up to get free protection for your applications and to get access to all the features.
- data/.rspec +1 -1
- data/LICENSE +1 -1
- data/Rakefile +5 -51
- data/bin/cucumber +7 -1
- data/cucumber.gemspec +463 -679
- data/examples/i18n/ar/features/step_definitons/calculator_steps.rb +1 -1
- data/examples/i18n/he/features/step_definitons/calculator_steps.rb +1 -1
- data/examples/i18n/ro/features/step_definitons/calculator_steps.rb +4 -7
- data/examples/i18n/ru/features/division.feature +2 -2
- data/examples/i18n/tr/features/step_definitons/hesap_makinesi_adimlari.rb +3 -3
- data/examples/sinatra/features/support/env.rb +2 -5
- data/examples/v8/features/fibonacci.feature +1 -1
- data/examples/watir/features/step_definitions/search_steps.rb +1 -1
- data/features/background.feature +284 -95
- data/features/custom_formatter.feature +3 -73
- data/features/json_formatter.feature +160 -245
- data/features/step_definitions/cucumber_steps.rb +7 -153
- data/features/support/env.rb +18 -140
- data/fixtures/junit/features/pending.feature +3 -1
- data/fixtures/self_test/features/support/env.rb +8 -0
- data/fixtures/tickets/features.html +1 -1
- data/gem_tasks/examples.rake +1 -1
- data/lib/cucumber.rb +12 -0
- data/lib/cucumber/ast.rb +1 -1
- data/lib/cucumber/ast/background.rb +21 -5
- data/lib/cucumber/ast/examples.rb +12 -4
- data/lib/cucumber/ast/feature.rb +13 -5
- data/lib/cucumber/ast/feature_element.rb +9 -4
- data/lib/cucumber/ast/outline_table.rb +4 -4
- data/lib/cucumber/ast/scenario.rb +7 -5
- data/lib/cucumber/ast/scenario_outline.rb +23 -15
- data/lib/cucumber/ast/step.rb +5 -0
- data/lib/cucumber/ast/step_invocation.rb +21 -15
- data/lib/cucumber/ast/table.rb +14 -8
- data/lib/cucumber/ast/tree_walker.rb +10 -48
- data/lib/cucumber/cli/configuration.rb +33 -8
- data/lib/cucumber/cli/main.rb +20 -35
- data/lib/cucumber/cli/options.rb +8 -7
- data/lib/cucumber/cli/profile_loader.rb +2 -0
- data/lib/cucumber/core_ext/proc.rb +2 -1
- data/lib/cucumber/feature_file.rb +47 -15
- data/lib/cucumber/formatter/ansicolor.rb +3 -5
- data/lib/cucumber/formatter/console.rb +27 -23
- data/lib/cucumber/formatter/cucumber.css +34 -17
- data/lib/cucumber/formatter/cucumber.sass +173 -182
- data/lib/cucumber/formatter/html.rb +46 -11
- data/lib/cucumber/formatter/io.rb +2 -4
- data/lib/cucumber/formatter/json.rb +15 -152
- data/lib/cucumber/formatter/json_pretty.rb +5 -6
- data/lib/cucumber/formatter/junit.rb +28 -22
- data/lib/cucumber/formatter/pdf.rb +6 -6
- data/lib/cucumber/formatter/pretty.rb +5 -5
- data/lib/cucumber/formatter/rerun.rb +22 -11
- data/lib/cucumber/formatter/unicode.rb +41 -20
- data/lib/cucumber/js_support/js_dsl.js +4 -4
- data/lib/cucumber/js_support/js_language.rb +9 -5
- data/lib/cucumber/js_support/js_snippets.rb +2 -2
- data/lib/cucumber/language_support.rb +2 -2
- data/lib/cucumber/parser/gherkin_builder.rb +35 -30
- data/lib/cucumber/platform.rb +8 -8
- data/lib/cucumber/py_support/py_language.rb +2 -2
- data/lib/cucumber/rake/task.rb +80 -31
- data/lib/cucumber/rb_support/rb_dsl.rb +1 -0
- data/lib/cucumber/rb_support/rb_language.rb +10 -8
- data/lib/cucumber/rb_support/rb_step_definition.rb +8 -0
- data/lib/cucumber/rb_support/rb_transform.rb +17 -0
- data/lib/cucumber/rb_support/rb_world.rb +26 -18
- data/lib/cucumber/rspec/doubles.rb +3 -3
- data/lib/cucumber/step_match.rb +6 -2
- data/lib/cucumber/step_mother.rb +6 -427
- data/lib/cucumber/wire_support/configuration.rb +4 -1
- data/lib/cucumber/wire_support/wire_language.rb +3 -10
- data/spec/cucumber/ast/background_spec.rb +68 -6
- data/spec/cucumber/ast/feature_factory.rb +5 -4
- data/spec/cucumber/ast/feature_spec.rb +4 -4
- data/spec/cucumber/ast/outline_table_spec.rb +1 -1
- data/spec/cucumber/ast/scenario_outline_spec.rb +15 -11
- data/spec/cucumber/ast/scenario_spec.rb +4 -4
- data/spec/cucumber/ast/step_spec.rb +3 -3
- data/spec/cucumber/ast/table_spec.rb +38 -2
- data/spec/cucumber/ast/tree_walker_spec.rb +2 -2
- data/spec/cucumber/broadcaster_spec.rb +1 -1
- data/spec/cucumber/cli/configuration_spec.rb +32 -6
- data/spec/cucumber/cli/drb_client_spec.rb +2 -3
- data/spec/cucumber/cli/main_spec.rb +43 -43
- data/spec/cucumber/cli/options_spec.rb +28 -1
- data/spec/cucumber/cli/profile_loader_spec.rb +1 -1
- data/spec/cucumber/core_ext/proc_spec.rb +1 -1
- data/spec/cucumber/formatter/ansicolor_spec.rb +1 -1
- data/spec/cucumber/formatter/duration_spec.rb +1 -1
- data/spec/cucumber/formatter/html_spec.rb +3 -5
- data/spec/cucumber/formatter/junit_spec.rb +16 -2
- data/spec/cucumber/formatter/progress_spec.rb +1 -1
- data/spec/cucumber/formatter/spec_helper.rb +11 -12
- data/spec/cucumber/rb_support/rb_language_spec.rb +241 -28
- data/spec/cucumber/rb_support/rb_step_definition_spec.rb +33 -28
- data/spec/cucumber/rb_support/regexp_argument_matcher_spec.rb +1 -1
- data/spec/cucumber/step_match_spec.rb +11 -9
- data/spec/cucumber/wire_support/configuration_spec.rb +1 -1
- data/spec/cucumber/wire_support/connection_spec.rb +1 -1
- data/spec/cucumber/wire_support/wire_exception_spec.rb +1 -1
- data/spec/cucumber/wire_support/wire_language_spec.rb +1 -1
- data/spec/cucumber/wire_support/wire_packet_spec.rb +1 -1
- data/spec/cucumber/wire_support/wire_step_definition_spec.rb +1 -1
- data/spec/cucumber/world/pending_spec.rb +2 -2
- data/spec/spec_helper.rb +13 -20
- metadata +11 -222
- data/.gitignore +0 -20
- data/Caliper.yml +0 -4
- data/History.txt +0 -1552
- data/README.rdoc +0 -26
- data/VERSION.yml +0 -5
- data/examples/i18n/ro/features/suma.feature +0 -11
- data/features/announce.feature +0 -164
- data/features/around_hooks.feature +0 -232
- data/features/bug_371.feature +0 -32
- data/features/bug_464.feature +0 -16
- data/features/bug_475.feature +0 -42
- data/features/bug_585_tab_indentation.feature +0 -22
- data/features/bug_600.feature +0 -67
- data/features/call_steps_from_stepdefs.feature +0 -154
- data/features/cucumber_cli.feature +0 -591
- data/features/cucumber_cli_outlines.feature +0 -117
- data/features/default_snippets.feature +0 -42
- data/features/diffing.feature +0 -25
- data/features/drb_server_integration.feature +0 -174
- data/features/exception_in_after_block.feature +0 -127
- data/features/exception_in_after_step_block.feature +0 -104
- data/features/exception_in_before_block.feature +0 -98
- data/features/exclude_files.feature +0 -20
- data/features/expand.feature +0 -60
- data/features/html_formatter.feature +0 -8
- data/features/html_formatter/a.html +0 -582
- data/features/junit_formatter.feature +0 -88
- data/features/language_from_header.feature +0 -30
- data/features/language_help.feature +0 -78
- data/features/listener_debugger_formatter.feature +0 -42
- data/features/multiline_names.feature +0 -44
- data/features/negative_tagged_hooks.feature +0 -60
- data/features/post_configuration_hook.feature +0 -37
- data/features/profiles.feature +0 -126
- data/features/rake_task.feature +0 -152
- data/features/report_called_undefined_steps.feature +0 -34
- data/features/rerun_formatter.feature +0 -45
- data/features/simplest.feature +0 -11
- data/features/snippet.feature +0 -23
- data/features/snippets_when_using_star_keyword.feature +0 -36
- data/features/step_definitions/extra_steps.rb +0 -2
- data/features/step_definitions/simplest_steps.rb +0 -3
- data/features/step_definitions/wire_steps.rb +0 -32
- data/features/support/env.rb.simplest +0 -7
- data/features/support/fake_wire_server.rb +0 -77
- data/features/table_diffing.feature +0 -45
- data/features/table_mapping.feature +0 -34
- data/features/tag_logic.feature +0 -258
- data/features/transform.feature +0 -245
- data/features/unicode_table.feature +0 -35
- data/features/usage_and_stepdefs_formatter.feature +0 -169
- data/features/wire_protocol.feature +0 -332
- data/features/wire_protocol_table_diffing.feature +0 -119
- data/features/wire_protocol_tags.feature +0 -87
- data/features/wire_protocol_timeouts.feature +0 -63
- data/features/work_in_progress.feature +0 -156
- data/fixtures/json/features/pystring.feature +0 -8
- data/fixtures/self_test/features/background/background_tagged_before_on_outline.feature +0 -12
- data/fixtures/self_test/features/background/background_with_name.feature +0 -7
- data/fixtures/self_test/features/background/failing_background.feature +0 -12
- data/fixtures/self_test/features/background/failing_background_after_success.feature +0 -11
- data/fixtures/self_test/features/background/multiline_args_background.feature +0 -32
- data/fixtures/self_test/features/background/passing_background.feature +0 -10
- data/fixtures/self_test/features/background/pending_background.feature +0 -10
- data/fixtures/self_test/features/background/scenario_outline_failing_background.feature +0 -16
- data/fixtures/self_test/features/background/scenario_outline_passing_background.feature +0 -16
- data/gem_tasks/features.rake +0 -14
- data/gem_tasks/sdoc.rake +0 -12
- data/lib/cucumber/ast/py_string.rb +0 -80
- data/lib/cucumber/formatter/color_io.rb +0 -23
- data/lib/cucumber/formatter/tag_cloud.rb +0 -35
- data/spec/cucumber/ast/py_string_spec.rb +0 -40
- data/spec/cucumber/formatter/color_io_spec.rb +0 -29
- data/spec/cucumber/step_mother_spec.rb +0 -302
@@ -1,119 +0,0 @@
|
|
1
|
-
@wire
|
2
|
-
Feature: Wire protocol table diffing
|
3
|
-
In order to use the amazing functionality in the Cucumber table object
|
4
|
-
As a wire server
|
5
|
-
I want to be able to ask for a table diff during a step definition invocation
|
6
|
-
|
7
|
-
Background:
|
8
|
-
Given a standard Cucumber project directory structure
|
9
|
-
And a file named "features/wired.feature" with:
|
10
|
-
"""
|
11
|
-
Feature: Hello
|
12
|
-
Scenario: Wired
|
13
|
-
Given we're all wired
|
14
|
-
|
15
|
-
"""
|
16
|
-
And a file named "features/step_definitions/some_remote_place.wire" with:
|
17
|
-
"""
|
18
|
-
host: localhost
|
19
|
-
port: 54321
|
20
|
-
|
21
|
-
"""
|
22
|
-
|
23
|
-
Scenario: Invoke a step definition tries to diff the table and fails
|
24
|
-
Given there is a wire server running on port 54321 which understands the following protocol:
|
25
|
-
| request | response |
|
26
|
-
| ["step_matches",{"name_to_match":"we're all wired"}] | ["success",[{"id":"1", "args":[]}]] |
|
27
|
-
| ["begin_scenario"] | ["success"] |
|
28
|
-
| ["invoke",{"id":"1","args":[]}] | ["diff",[[["a","b"],["c","d"]],[["x","y"],["z","z"]]]] |
|
29
|
-
| ["diff_failed"] | ["fail",{"message":"Not same", "exception":"DifferentException", "backtrace":["a.cs:12","b.cs:34"]}] |
|
30
|
-
| ["end_scenario"] | ["success"] |
|
31
|
-
When I run cucumber -f progress --backtrace
|
32
|
-
Then STDERR should be empty
|
33
|
-
And it should fail with
|
34
|
-
"""
|
35
|
-
F
|
36
|
-
|
37
|
-
(::) failed steps (::)
|
38
|
-
|
39
|
-
Not same (DifferentException from localhost:54321)
|
40
|
-
a.cs:12
|
41
|
-
b.cs:34
|
42
|
-
features/wired.feature:3:in `Given we're all wired'
|
43
|
-
|
44
|
-
Failing Scenarios:
|
45
|
-
cucumber features/wired.feature:2 # Scenario: Wired
|
46
|
-
|
47
|
-
1 scenario (1 failed)
|
48
|
-
1 step (1 failed)
|
49
|
-
|
50
|
-
"""
|
51
|
-
|
52
|
-
Scenario: Invoke a step definition tries to diff the table and passes
|
53
|
-
Given there is a wire server running on port 54321 which understands the following protocol:
|
54
|
-
| request | response |
|
55
|
-
| ["step_matches",{"name_to_match":"we're all wired"}] | ["success",[{"id":"1", "args":[]}]] |
|
56
|
-
| ["begin_scenario"] | ["success"] |
|
57
|
-
| ["invoke",{"id":"1","args":[]}] | ["diff",[[["a"],["b"]],[["a"],["b"]]]] |
|
58
|
-
| ["diff_ok"] | ["success"] |
|
59
|
-
| ["end_scenario"] | ["success"] |
|
60
|
-
When I run cucumber -f progress
|
61
|
-
And it should pass with
|
62
|
-
"""
|
63
|
-
.
|
64
|
-
|
65
|
-
1 scenario (1 passed)
|
66
|
-
1 step (1 passed)
|
67
|
-
|
68
|
-
"""
|
69
|
-
|
70
|
-
Scenario: Invoke a step definition which successfully diffs a table but then fails
|
71
|
-
Given there is a wire server running on port 54321 which understands the following protocol:
|
72
|
-
| request | response |
|
73
|
-
| ["step_matches",{"name_to_match":"we're all wired"}] | ["success",[{"id":"1", "args":[]}]] |
|
74
|
-
| ["begin_scenario"] | ["success"] |
|
75
|
-
| ["invoke",{"id":"1","args":[]}] | ["diff",[[["a"],["b"]],[["a"],["b"]]]] |
|
76
|
-
| ["diff_ok"] | ["fail",{"message":"I wanted things to be different for us"}] |
|
77
|
-
| ["end_scenario"] | ["success"] |
|
78
|
-
When I run cucumber -f progress
|
79
|
-
And it should fail with
|
80
|
-
"""
|
81
|
-
F
|
82
|
-
|
83
|
-
(::) failed steps (::)
|
84
|
-
|
85
|
-
I wanted things to be different for us (Cucumber::WireSupport::WireException)
|
86
|
-
features/wired.feature:3:in `Given we're all wired'
|
87
|
-
|
88
|
-
Failing Scenarios:
|
89
|
-
cucumber features/wired.feature:2 # Scenario: Wired
|
90
|
-
|
91
|
-
1 scenario (1 failed)
|
92
|
-
1 step (1 failed)
|
93
|
-
|
94
|
-
"""
|
95
|
-
|
96
|
-
Scenario: Invoke a step definition which asks for an immediate diff that fails
|
97
|
-
Given there is a wire server running on port 54321 which understands the following protocol:
|
98
|
-
| request | response |
|
99
|
-
| ["step_matches",{"name_to_match":"we're all wired"}] | ["success",[{"id":"1", "args":[]}]] |
|
100
|
-
| ["begin_scenario"] | ["success"] |
|
101
|
-
| ["invoke",{"id":"1","args":[]}] | ["diff!",[[["a"]],[["b"]]]] |
|
102
|
-
| ["end_scenario"] | ["success"] |
|
103
|
-
When I run cucumber -f progress
|
104
|
-
And it should fail with
|
105
|
-
"""
|
106
|
-
F
|
107
|
-
|
108
|
-
(::) failed steps (::)
|
109
|
-
|
110
|
-
Tables were not identical (Cucumber::Ast::Table::Different)
|
111
|
-
features/wired.feature:3:in `Given we're all wired'
|
112
|
-
|
113
|
-
Failing Scenarios:
|
114
|
-
cucumber features/wired.feature:2 # Scenario: Wired
|
115
|
-
|
116
|
-
1 scenario (1 failed)
|
117
|
-
1 step (1 failed)
|
118
|
-
|
119
|
-
"""
|
@@ -1,87 +0,0 @@
|
|
1
|
-
@wire
|
2
|
-
Feature: Wire protocol tags
|
3
|
-
In order to use Before and After hooks in a wire server, we send tags with the
|
4
|
-
scenario in the begin_scenario and end_scenario messages
|
5
|
-
|
6
|
-
Background:
|
7
|
-
Given a standard Cucumber project directory structure
|
8
|
-
And a file named "features/step_definitions/some_remote_place.wire" with:
|
9
|
-
"""
|
10
|
-
host: localhost
|
11
|
-
port: 54321
|
12
|
-
|
13
|
-
"""
|
14
|
-
|
15
|
-
Scenario: Run a scenario
|
16
|
-
Given a file named "features/wired.feature" with:
|
17
|
-
"""
|
18
|
-
@foo @bar
|
19
|
-
Feature: Wired
|
20
|
-
|
21
|
-
@baz
|
22
|
-
Scenario: Everybody's Wired
|
23
|
-
Given we're all wired
|
24
|
-
|
25
|
-
"""
|
26
|
-
And there is a wire server running on port 54321 which understands the following protocol:
|
27
|
-
| request | response |
|
28
|
-
| ["step_matches",{"name_to_match":"we're all wired"}] | ["success",[{"id":"1", "args":[]}]] |
|
29
|
-
| ["begin_scenario", {"tags":["bar","baz","foo"]}] | ["success"] |
|
30
|
-
| ["invoke",{"id":"1","args":[]}] | ["success"] |
|
31
|
-
| ["end_scenario", {"tags":["bar","baz","foo"]}] | ["success"] |
|
32
|
-
When I run cucumber -f pretty -q
|
33
|
-
Then STDERR should be empty
|
34
|
-
And it should pass with
|
35
|
-
"""
|
36
|
-
@foo @bar
|
37
|
-
Feature: Wired
|
38
|
-
|
39
|
-
@baz
|
40
|
-
Scenario: Everybody's Wired
|
41
|
-
Given we're all wired
|
42
|
-
|
43
|
-
1 scenario (1 passed)
|
44
|
-
1 step (1 passed)
|
45
|
-
|
46
|
-
"""
|
47
|
-
|
48
|
-
Scenario: Run a scenario outline example
|
49
|
-
Given a file named "features/wired.feature" with:
|
50
|
-
"""
|
51
|
-
@foo @bar
|
52
|
-
Feature: Wired
|
53
|
-
|
54
|
-
@baz
|
55
|
-
Scenario Outline: Everybody's Wired
|
56
|
-
Given we're all <something>
|
57
|
-
|
58
|
-
Examples:
|
59
|
-
| something |
|
60
|
-
| wired |
|
61
|
-
|
62
|
-
"""
|
63
|
-
And there is a wire server running on port 54321 which understands the following protocol:
|
64
|
-
| request | response |
|
65
|
-
| ["step_matches",{"name_to_match":"we're all wired"}] | ["success",[{"id":"1", "args":[]}]] |
|
66
|
-
| ["begin_scenario", {"tags":["bar","baz","foo"]}] | ["success"] |
|
67
|
-
| ["invoke",{"id":"1","args":[]}] | ["success"] |
|
68
|
-
| ["end_scenario", {"tags":["bar","baz","foo"]}] | ["success"] |
|
69
|
-
When I run cucumber -f pretty -q
|
70
|
-
Then STDERR should be empty
|
71
|
-
And it should pass with
|
72
|
-
"""
|
73
|
-
@foo @bar
|
74
|
-
Feature: Wired
|
75
|
-
|
76
|
-
@baz
|
77
|
-
Scenario Outline: Everybody's Wired
|
78
|
-
Given we're all <something>
|
79
|
-
|
80
|
-
Examples:
|
81
|
-
| something |
|
82
|
-
| wired |
|
83
|
-
|
84
|
-
1 scenario (1 passed)
|
85
|
-
1 step (1 passed)
|
86
|
-
|
87
|
-
"""
|
@@ -1,63 +0,0 @@
|
|
1
|
-
@wire
|
2
|
-
Feature: Wire protocol timeouts
|
3
|
-
We don't want Cucumber to hang forever on a wire server that's not even there,
|
4
|
-
but equally we need to give the user the flexibility to allow step definitions
|
5
|
-
to take a while to execute, if that's what they need.
|
6
|
-
|
7
|
-
Background:
|
8
|
-
Given a standard Cucumber project directory structure
|
9
|
-
And a file named "features/wired.feature" with:
|
10
|
-
"""
|
11
|
-
Feature: Telegraphy
|
12
|
-
Scenario: Wired
|
13
|
-
Given we're all wired
|
14
|
-
|
15
|
-
"""
|
16
|
-
|
17
|
-
Scenario: Try to talk to a server that's not there
|
18
|
-
Given a file named "features/step_definitions/some_remote_place.wire" with:
|
19
|
-
"""
|
20
|
-
host: localhost
|
21
|
-
port: 54321
|
22
|
-
|
23
|
-
"""
|
24
|
-
When I run cucumber -f progress
|
25
|
-
Then STDERR should match
|
26
|
-
"""
|
27
|
-
Unable to contact the wire server at localhost:54321
|
28
|
-
"""
|
29
|
-
|
30
|
-
Scenario: Invoke a step definition that takes longer than its timeout
|
31
|
-
Given a file named "features/step_definitions/some_remote_place.wire" with:
|
32
|
-
"""
|
33
|
-
host: localhost
|
34
|
-
port: 54321
|
35
|
-
timeout:
|
36
|
-
invoke: 0.1
|
37
|
-
|
38
|
-
"""
|
39
|
-
And there is a wire server on port 54321 which understands the following protocol:
|
40
|
-
| request | response |
|
41
|
-
| ["step_matches",{"name_to_match":"we're all wired"}] | ["success",[{"id":"1", "args":[{"val":"wired", "pos":10}]}]] |
|
42
|
-
| ["begin_scenario"] | ["success"] |
|
43
|
-
| ["invoke",{"id":"1","args":["wired"]}] | ["success"] |
|
44
|
-
| ["end_scenario"] | ["success"] |
|
45
|
-
And the wire server takes 0.2 seconds to respond to the invoke message
|
46
|
-
When I run cucumber -f pretty
|
47
|
-
Then STDERR should be empty
|
48
|
-
And it should fail with
|
49
|
-
"""
|
50
|
-
Feature: Telegraphy
|
51
|
-
|
52
|
-
Scenario: Wired # features/wired.feature:2
|
53
|
-
Given we're all wired # Unknown
|
54
|
-
Timed out calling wire server with message 'invoke' (Timeout::Error)
|
55
|
-
features/wired.feature:3:in `Given we're all wired'
|
56
|
-
|
57
|
-
Failing Scenarios:
|
58
|
-
cucumber features/wired.feature:2 # Scenario: Wired
|
59
|
-
|
60
|
-
1 scenario (1 failed)
|
61
|
-
1 step (1 failed)
|
62
|
-
|
63
|
-
"""
|
@@ -1,156 +0,0 @@
|
|
1
|
-
Feature: Cucumber --work-in-progress switch
|
2
|
-
In order to ensure that feature scenarios do not pass until they are expected to
|
3
|
-
Developers should be able to run cucumber in a mode that
|
4
|
-
- will fail if any scenario passes completely
|
5
|
-
- will not fail otherwise
|
6
|
-
|
7
|
-
Background: A passing and a pending feature
|
8
|
-
Given a standard Cucumber project directory structure
|
9
|
-
Given a file named "features/wip.feature" with:
|
10
|
-
"""
|
11
|
-
Feature: WIP
|
12
|
-
@failing
|
13
|
-
Scenario: Failing
|
14
|
-
Given a failing step
|
15
|
-
|
16
|
-
@undefined
|
17
|
-
Scenario: Undefined
|
18
|
-
Given an undefined step
|
19
|
-
|
20
|
-
@pending
|
21
|
-
Scenario: Pending
|
22
|
-
Given a pending step
|
23
|
-
|
24
|
-
@passing
|
25
|
-
Scenario: Passing
|
26
|
-
Given a passing step
|
27
|
-
"""
|
28
|
-
And a file named "features/passing_outline.feature" with:
|
29
|
-
"""
|
30
|
-
Feature: Not WIP
|
31
|
-
Scenario Outline: Passing
|
32
|
-
Given a <what> step
|
33
|
-
|
34
|
-
Examples:
|
35
|
-
| what |
|
36
|
-
| passing |
|
37
|
-
"""
|
38
|
-
And a file named "features/step_definitions/steps.rb" with:
|
39
|
-
"""
|
40
|
-
Given /^a failing step$/ do
|
41
|
-
raise "I fail"
|
42
|
-
end
|
43
|
-
|
44
|
-
Given /^a passing step$/ do
|
45
|
-
end
|
46
|
-
|
47
|
-
Given /^a pending step$/ do
|
48
|
-
pending
|
49
|
-
end
|
50
|
-
"""
|
51
|
-
|
52
|
-
Scenario: Pass with Failing Scenarios
|
53
|
-
When I run cucumber -q -w -t @failing features/wip.feature
|
54
|
-
Then STDERR should be empty
|
55
|
-
Then it should pass with
|
56
|
-
"""
|
57
|
-
Feature: WIP
|
58
|
-
|
59
|
-
@failing
|
60
|
-
Scenario: Failing
|
61
|
-
Given a failing step
|
62
|
-
I fail (RuntimeError)
|
63
|
-
./features/step_definitions/steps.rb:2:in `/^a failing step$/'
|
64
|
-
features/wip.feature:4:in `Given a failing step'
|
65
|
-
|
66
|
-
Failing Scenarios:
|
67
|
-
cucumber features/wip.feature:3 # Scenario: Failing
|
68
|
-
|
69
|
-
1 scenario (1 failed)
|
70
|
-
1 step (1 failed)
|
71
|
-
|
72
|
-
The --wip switch was used, so the failures were expected. All is good.
|
73
|
-
|
74
|
-
"""
|
75
|
-
|
76
|
-
Scenario: Pass with Undefined Scenarios
|
77
|
-
When I run cucumber -q -w -t @undefined features/wip.feature
|
78
|
-
Then it should pass with
|
79
|
-
"""
|
80
|
-
Feature: WIP
|
81
|
-
|
82
|
-
@undefined
|
83
|
-
Scenario: Undefined
|
84
|
-
Given an undefined step
|
85
|
-
|
86
|
-
1 scenario (1 undefined)
|
87
|
-
1 step (1 undefined)
|
88
|
-
|
89
|
-
The --wip switch was used, so the failures were expected. All is good.
|
90
|
-
|
91
|
-
"""
|
92
|
-
|
93
|
-
Scenario: Pass with Undefined Scenarios
|
94
|
-
When I run cucumber -q -w -t @pending features/wip.feature
|
95
|
-
Then it should pass with
|
96
|
-
"""
|
97
|
-
Feature: WIP
|
98
|
-
|
99
|
-
@pending
|
100
|
-
Scenario: Pending
|
101
|
-
Given a pending step
|
102
|
-
TODO (Cucumber::Pending)
|
103
|
-
./features/step_definitions/steps.rb:9:in `/^a pending step$/'
|
104
|
-
features/wip.feature:12:in `Given a pending step'
|
105
|
-
|
106
|
-
1 scenario (1 pending)
|
107
|
-
1 step (1 pending)
|
108
|
-
|
109
|
-
The --wip switch was used, so the failures were expected. All is good.
|
110
|
-
|
111
|
-
"""
|
112
|
-
|
113
|
-
Scenario: Fail with Passing Scenarios
|
114
|
-
When I run cucumber -q -w -t @passing features/wip.feature
|
115
|
-
Then it should fail with
|
116
|
-
"""
|
117
|
-
Feature: WIP
|
118
|
-
|
119
|
-
@passing
|
120
|
-
Scenario: Passing
|
121
|
-
Given a passing step
|
122
|
-
|
123
|
-
1 scenario (1 passed)
|
124
|
-
1 step (1 passed)
|
125
|
-
|
126
|
-
The --wip switch was used, so I didn't expect anything to pass. These scenarios passed:
|
127
|
-
(::) passed scenarios (::)
|
128
|
-
|
129
|
-
features/wip.feature:15:in `Scenario: Passing'
|
130
|
-
|
131
|
-
|
132
|
-
"""
|
133
|
-
|
134
|
-
Scenario: Fail with Passing Scenario Outline
|
135
|
-
When I run cucumber -q -w features/passing_outline.feature
|
136
|
-
Then it should fail with
|
137
|
-
"""
|
138
|
-
Feature: Not WIP
|
139
|
-
|
140
|
-
Scenario Outline: Passing
|
141
|
-
Given a <what> step
|
142
|
-
|
143
|
-
Examples:
|
144
|
-
| what |
|
145
|
-
| passing |
|
146
|
-
|
147
|
-
1 scenario (1 passed)
|
148
|
-
1 step (1 passed)
|
149
|
-
|
150
|
-
The --wip switch was used, so I didn't expect anything to pass. These scenarios passed:
|
151
|
-
(::) passed scenarios (::)
|
152
|
-
|
153
|
-
features/passing_outline.feature:7:in `| passing |'
|
154
|
-
|
155
|
-
|
156
|
-
"""
|