cucumber 0.8.6 → 0.8.7
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/.rspec +1 -1
- data/Caliper.yml +4 -0
- data/History.txt +1557 -0
- data/LICENSE +1 -1
- data/README.rdoc +26 -0
- data/Rakefile +51 -5
- data/VERSION.yml +5 -0
- data/bin/cucumber +1 -7
- data/cucumber.gemspec +77 -3
- 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 +7 -4
- data/examples/i18n/ro/features/suma.feature +11 -0
- 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 +5 -2
- data/examples/v8/features/fibonacci.feature +1 -1
- data/examples/watir/features/step_definitions/search_steps.rb +1 -1
- data/features/announce.feature +164 -0
- data/features/around_hooks.feature +232 -0
- data/features/background.feature +95 -284
- data/features/bug_371.feature +32 -0
- data/features/bug_464.feature +16 -0
- data/features/bug_475.feature +42 -0
- data/features/bug_585_tab_indentation.feature +22 -0
- data/features/bug_600.feature +67 -0
- data/features/call_steps_from_stepdefs.feature +154 -0
- data/features/cucumber_cli.feature +591 -0
- data/features/cucumber_cli_outlines.feature +117 -0
- data/features/custom_formatter.feature +73 -3
- data/features/default_snippets.feature +42 -0
- data/features/diffing.feature +25 -0
- data/features/drb_server_integration.feature +174 -0
- data/features/exception_in_after_block.feature +127 -0
- data/features/exception_in_after_step_block.feature +104 -0
- data/features/exception_in_before_block.feature +98 -0
- data/features/exclude_files.feature +20 -0
- data/features/expand.feature +60 -0
- data/features/html_formatter.feature +8 -0
- data/features/html_formatter/a.html +582 -0
- data/features/json_formatter.feature +245 -160
- data/features/junit_formatter.feature +88 -0
- data/features/language_from_header.feature +30 -0
- data/features/language_help.feature +78 -0
- data/features/listener_debugger_formatter.feature +42 -0
- data/features/multiline_names.feature +44 -0
- data/features/negative_tagged_hooks.feature +60 -0
- data/features/post_configuration_hook.feature +37 -0
- data/features/profiles.feature +126 -0
- data/features/rake_task.feature +152 -0
- data/features/report_called_undefined_steps.feature +34 -0
- data/features/rerun_formatter.feature +45 -0
- data/features/simplest.feature +11 -0
- data/features/snippet.feature +23 -0
- data/features/snippets_when_using_star_keyword.feature +36 -0
- data/features/step_definitions/cucumber_steps.rb +153 -7
- data/features/step_definitions/extra_steps.rb +2 -0
- data/features/step_definitions/simplest_steps.rb +3 -0
- data/features/step_definitions/wire_steps.rb +32 -0
- data/features/support/env.rb +140 -18
- data/features/support/env.rb.simplest +7 -0
- data/features/support/fake_wire_server.rb +77 -0
- data/features/table_diffing.feature +45 -0
- data/features/table_mapping.feature +34 -0
- data/features/tag_logic.feature +258 -0
- data/features/transform.feature +245 -0
- data/features/unicode_table.feature +35 -0
- data/features/usage_and_stepdefs_formatter.feature +169 -0
- data/features/wire_protocol.feature +332 -0
- data/features/wire_protocol_table_diffing.feature +119 -0
- data/features/wire_protocol_tags.feature +87 -0
- data/features/wire_protocol_timeouts.feature +63 -0
- data/features/work_in_progress.feature +156 -0
- data/fixtures/json/features/pystring.feature +8 -0
- data/fixtures/junit/features/pending.feature +1 -3
- data/fixtures/self_test/features/background/background_tagged_before_on_outline.feature +12 -0
- data/fixtures/self_test/features/background/background_with_name.feature +7 -0
- data/fixtures/self_test/features/background/failing_background.feature +12 -0
- data/fixtures/self_test/features/background/failing_background_after_success.feature +11 -0
- data/fixtures/self_test/features/background/multiline_args_background.feature +32 -0
- data/fixtures/self_test/features/background/passing_background.feature +10 -0
- data/fixtures/self_test/features/background/pending_background.feature +10 -0
- data/fixtures/self_test/features/background/scenario_outline_failing_background.feature +16 -0
- data/fixtures/self_test/features/background/scenario_outline_passing_background.feature +16 -0
- data/fixtures/self_test/features/support/env.rb +0 -8
- data/fixtures/tickets/features.html +1 -1
- data/gem_tasks/examples.rake +1 -1
- data/gem_tasks/features.rake +14 -0
- data/gem_tasks/sdoc.rake +12 -0
- data/lib/cucumber.rb +0 -12
- data/lib/cucumber/ast.rb +1 -1
- data/lib/cucumber/ast/background.rb +5 -21
- data/lib/cucumber/ast/examples.rb +4 -12
- data/lib/cucumber/ast/feature.rb +5 -13
- data/lib/cucumber/ast/feature_element.rb +4 -9
- data/lib/cucumber/ast/outline_table.rb +4 -4
- data/lib/cucumber/ast/py_string.rb +80 -0
- data/lib/cucumber/ast/scenario.rb +5 -7
- data/lib/cucumber/ast/scenario_outline.rb +15 -23
- data/lib/cucumber/ast/step.rb +0 -5
- data/lib/cucumber/ast/step_invocation.rb +15 -21
- data/lib/cucumber/ast/table.rb +8 -14
- data/lib/cucumber/ast/tree_walker.rb +48 -10
- data/lib/cucumber/cli/configuration.rb +8 -33
- data/lib/cucumber/cli/main.rb +35 -20
- data/lib/cucumber/cli/options.rb +7 -8
- data/lib/cucumber/cli/profile_loader.rb +0 -2
- data/lib/cucumber/core_ext/proc.rb +1 -2
- data/lib/cucumber/feature_file.rb +15 -47
- data/lib/cucumber/formatter/ansicolor.rb +5 -3
- data/lib/cucumber/formatter/color_io.rb +23 -0
- data/lib/cucumber/formatter/console.rb +23 -27
- data/lib/cucumber/formatter/cucumber.css +17 -34
- data/lib/cucumber/formatter/cucumber.sass +182 -173
- data/lib/cucumber/formatter/html.rb +11 -46
- data/lib/cucumber/formatter/io.rb +4 -2
- data/lib/cucumber/formatter/json.rb +152 -15
- data/lib/cucumber/formatter/json_pretty.rb +6 -5
- data/lib/cucumber/formatter/junit.rb +22 -28
- data/lib/cucumber/formatter/pdf.rb +6 -6
- data/lib/cucumber/formatter/pretty.rb +5 -5
- data/lib/cucumber/formatter/rerun.rb +11 -22
- data/lib/cucumber/formatter/tag_cloud.rb +35 -0
- data/lib/cucumber/formatter/unicode.rb +20 -41
- data/lib/cucumber/js_support/js_dsl.js +4 -4
- data/lib/cucumber/js_support/js_language.rb +5 -9
- 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 +30 -35
- data/lib/cucumber/platform.rb +8 -8
- data/lib/cucumber/py_support/py_language.rb +2 -2
- data/lib/cucumber/rake/task.rb +31 -74
- data/lib/cucumber/rb_support/rb_dsl.rb +0 -1
- data/lib/cucumber/rb_support/rb_language.rb +8 -10
- data/lib/cucumber/rb_support/rb_step_definition.rb +0 -8
- data/lib/cucumber/rb_support/rb_transform.rb +0 -17
- data/lib/cucumber/rb_support/rb_world.rb +18 -26
- data/lib/cucumber/rspec/doubles.rb +3 -3
- data/lib/cucumber/step_match.rb +2 -6
- data/lib/cucumber/step_mother.rb +427 -6
- data/lib/cucumber/wire_support/configuration.rb +1 -4
- data/lib/cucumber/wire_support/wire_language.rb +10 -3
- data/spec/cucumber/ast/background_spec.rb +6 -68
- data/spec/cucumber/ast/feature_factory.rb +4 -5
- data/spec/cucumber/ast/feature_spec.rb +4 -4
- data/spec/cucumber/ast/outline_table_spec.rb +1 -1
- data/spec/cucumber/ast/py_string_spec.rb +40 -0
- data/spec/cucumber/ast/scenario_outline_spec.rb +11 -15
- 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 +2 -38
- 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 +6 -32
- data/spec/cucumber/cli/drb_client_spec.rb +3 -2
- data/spec/cucumber/cli/main_spec.rb +43 -43
- data/spec/cucumber/cli/options_spec.rb +1 -28
- 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/color_io_spec.rb +29 -0
- data/spec/cucumber/formatter/duration_spec.rb +1 -1
- data/spec/cucumber/formatter/html_spec.rb +5 -3
- data/spec/cucumber/formatter/junit_spec.rb +2 -16
- data/spec/cucumber/formatter/progress_spec.rb +1 -1
- data/spec/cucumber/formatter/spec_helper.rb +12 -11
- data/spec/cucumber/rb_support/rb_language_spec.rb +28 -241
- data/spec/cucumber/rb_support/rb_step_definition_spec.rb +28 -33
- data/spec/cucumber/rb_support/regexp_argument_matcher_spec.rb +1 -1
- data/spec/cucumber/step_match_spec.rb +9 -11
- data/spec/cucumber/step_mother_spec.rb +302 -0
- 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 +20 -13
- metadata +78 -4
|
@@ -0,0 +1,87 @@
|
|
|
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
|
+
"""
|
|
@@ -0,0 +1,63 @@
|
|
|
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
|
+
"""
|
|
@@ -0,0 +1,156 @@
|
|
|
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
|
+
"""
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Feature: Failing background after previously successful background sample
|
|
2
|
+
|
|
3
|
+
Background:
|
|
4
|
+
Given passing without a table
|
|
5
|
+
And '10' global cukes
|
|
6
|
+
|
|
7
|
+
Scenario: passing background
|
|
8
|
+
Then I should have '10' global cukes
|
|
9
|
+
|
|
10
|
+
Scenario: failing background
|
|
11
|
+
Then I should have '10' global cukes
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
Feature: Passing background with multiline args
|
|
2
|
+
|
|
3
|
+
Background:
|
|
4
|
+
Given table
|
|
5
|
+
|a|b|
|
|
6
|
+
|c|d|
|
|
7
|
+
And multiline string
|
|
8
|
+
"""
|
|
9
|
+
I'm a cucumber and I'm okay.
|
|
10
|
+
I sleep all night and I test all day
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
Scenario: passing background
|
|
14
|
+
Then the table should be
|
|
15
|
+
|a|b|
|
|
16
|
+
|c|d|
|
|
17
|
+
Then the multiline string should be
|
|
18
|
+
"""
|
|
19
|
+
I'm a cucumber and I'm okay.
|
|
20
|
+
I sleep all night and I test all day
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
Scenario: another passing background
|
|
24
|
+
Then the table should be
|
|
25
|
+
|a|b|
|
|
26
|
+
|c|d|
|
|
27
|
+
Then the multiline string should be
|
|
28
|
+
"""
|
|
29
|
+
I'm a cucumber and I'm okay.
|
|
30
|
+
I sleep all night and I test all day
|
|
31
|
+
"""
|
|
32
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Feature: Failing background with scenario outlines sample
|
|
2
|
+
|
|
3
|
+
Background:
|
|
4
|
+
Given failing without a table
|
|
5
|
+
|
|
6
|
+
Scenario Outline: failing background
|
|
7
|
+
Then I should have '<count>' cukes
|
|
8
|
+
Examples:
|
|
9
|
+
|count|
|
|
10
|
+
| 10 |
|
|
11
|
+
|
|
12
|
+
Scenario Outline: another failing background
|
|
13
|
+
Then I should have '<count>' cukes
|
|
14
|
+
Examples:
|
|
15
|
+
|count|
|
|
16
|
+
| 10 |
|