Skip to content

Commit

Permalink
Remove some scenarios that are tested through unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwynne committed Mar 26, 2015
1 parent 6b679ae commit 4bd6745
Showing 1 changed file with 11 additions and 66 deletions.
77 changes: 11 additions & 66 deletions features/docs/cli/run_specific_scenarios.feature
Expand Up @@ -3,90 +3,35 @@ Feature: Run specific scenarios
You can choose to run a specific scenario using the file:line format,
or you can pass in a file with a list of scenarios using @-notation.

The line number can fall anywhere within the body of a scenario, including
steps, tags, comments, description, data tables or doc strings.

For scenario outlines, if the line hits one example row, just that one
will be run. Otherwise all examples in the table or outline will be run.

Background:
Given the standard step definitions

Scenario: Two scenarios, run just one of them
Given a file named "features/test.feature" with:
"""
Feature:
Scenario:
Scenario: Miss
Given this step is undefined
Scenario: Hit
Given this step passes
"""
When I run `cucumber features/test.feature:5 -f progress`
When I run `cucumber features/test.feature:7 --format pretty --quiet`
Then it should pass with:
"""
1 scenario (1 passed)
"""

Scenario: Single example from a scenario outline
Given a file named "features/test.feature" with:
"""
Feature:
Scenario Outline:
Given this step <something>
Examples:
| something |
| is undefined |
| fails |
Scenario: Miss
Given this step passes
"""
When I run `cucumber features/test.feature:8 -f progress`
Then it should fail with:
"""
1 scenario (1 failed)
"""

@spawn
Scenario: Specify 2 line numbers where one is a tag
Given a file named "features/test.feature" with:
"""
Feature: Sample
@two @three
Scenario:
Given this step passes
Feature:
@four
Scenario:
Scenario: Hit
Given this step passes
"""
When I run `cucumber -q features/test.feature:3:8`
Then it should pass with:
"""
2 scenarios (2 passed)
2 steps (2 passed)
"""

Scenario: Specify the line number of a row
Given a file named "features/test.feature" with:
"""
Feature: Sample
Scenario: Passing
Given this step is a table step
| a | b |
| c | d |
"""
When I run `cucumber -q features/test.feature:4`
Then it should pass with:
"""
Feature: Sample
Scenario: Passing
Given this step is a table step
| a | b |
| c | d |
1 scenario (1 passed)
1 step (1 passed)
"""

Scenario: Use @-notation to specify a file containing feature file list
Expand Down

0 comments on commit 4bd6745

Please sign in to comment.