forked from cucumber/cucumber-ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a94e2ae
commit 6634d25
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
Feature: Fail fast | ||
|
||
The --fail-fast flag causes Cucumber to exit immediately after the first | ||
scenario fails. | ||
|
||
Scenario: When a scenario fails | ||
Given a file named "features/bad.feature" with: | ||
""" | ||
Feature: Bad | ||
Scenario: Failing | ||
Given this step fails | ||
""" | ||
And a file named "features/good.feature" with: | ||
""" | ||
Feature: Good | ||
Scenario: Passing | ||
Given this step passes | ||
""" | ||
And the standard step definitions | ||
When I run `cucumber --fail-fast` | ||
Then it should fail | ||
And the output should contain: | ||
""" | ||
1 scenario (1 failed) | ||
""" | ||
|
||
Scenario: When all the scenarios pass | ||
Given a file named "features/first.feature" with: | ||
""" | ||
Feature: first feature | ||
Scenario: foo first | ||
Given this step passes | ||
Scenario: bar first | ||
Given this step passes | ||
""" | ||
And a file named "features/second.feature" with: | ||
""" | ||
Feature: second | ||
Scenario: foo second | ||
Given this step passes | ||
Scenario: bar second | ||
Given this step passes | ||
""" | ||
When I run `cucumber --fail-fast` | ||
Then it should pass |