Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support line number appended to path
- Loading branch information
1 parent
5f754c6
commit 500ec9a
Showing
4 changed files
with
52 additions
and
57 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
39 changes: 39 additions & 0 deletions
39
features/command_line/line_number_appended_to_path.feature
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,39 @@ | |||
Feature: line number appended to file path | |||
|
|||
As an RSpec user | |||
I want to run one example identified by the | |||
line number appended to the filepath | |||
|
|||
Background: | |||
Given a file named "example_spec.rb" with: | |||
""" | |||
describe "a group" do | |||
it "has a first example" do | |||
end | |||
it "has a second example" do | |||
end | |||
end | |||
""" | |||
|
|||
Scenario: two examples - both examples from the group declaration | |||
When I run "spec example_spec.rb:1 --format doc" | |||
Then the stdout should match "2 examples, 0 failures" | |||
And the stdout should match "has a second example" | |||
And the stdout should match "has a first example" | |||
|
|||
Scenario: two examples - first example on declaration line | |||
When I run "spec example_spec.rb:3 --format doc" | |||
Then the stdout should match "1 example, 0 failures" | |||
And the stdout should match "has a first example" | |||
But the stdout should not match "has a second example" | |||
|
|||
Scenario: two examples - second example on declaration line | |||
When I run "spec example_spec.rb:7 --format doc" | |||
Then the stdout should match "1 example, 0 failures" | |||
And the stdout should match "has a second example" | |||
But the stdout should not match "has a first example" |
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
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