1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
|
Feature: Rerun formatter
For details see https://github.com/cucumber/cucumber/issues/57
Background:
Given a file named "features/one_passing_one_failing.feature" with:
"""
Feature: One passing example, one failing example
Scenario Outline:
Given a <certain> step
Examples:
|certain|
|passing|
|failing|
"""
Given a file named "features/passing_outline.feature" with:
"""
Feature: One passing example
Scenario Outline:
Given a <certain> step
Examples:
|certain|
|passing|
"""
And a file named "features/failing_background.feature" with:
"""
Feature: Failing background sample
Background:
Given a failing step
Scenario: failing background
Then a passing step
Scenario: another failing background
Then a passing step
"""
And a file named "features/failing_background_outline.feature" with:
"""
Feature: Failing background sample with scenario outline
Background:
Given a failing step
Scenario Outline:
Then a <certain> step
Examples:
|certain|
|passing|
|passing|
"""
And a file named "features/step_definitions/steps.rb" with:
"""
Given /a passing step/ do
#does nothing
end
Given /a failing step/ do
fail
end
"""
Scenario: Handle examples with the rerun formatter
When I run `cucumber features/one_passing_one_failing.feature -r features -f rerun`
Then it should fail with:
"""
features/one_passing_one_failing.feature:9
"""
Scenario: Handle examples using expand with the rerun formatter
When I run `cucumber features/one_passing_one_failing.feature --expand -r features -f rerun`
Then it should fail with:
"""
features/one_passing_one_failing.feature:9
"""
Scenario: Handle scenario outline with passing example
When I run `cucumber features/passing_outline.feature -r features -f rerun`
Then it should pass
Scenario: Failing background
When I run `cucumber features/failing_background.feature -r features -f rerun`
Then it should fail with:
"""
features/failing_background.feature:6:9
"""
Scenario: Failing background with scenario outline
When I run `cucumber features/failing_background_outline.feature -r features -f rerun`
Then it should fail with:
"""
features/failing_background_outline.feature:11:12
"""
|