Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: v2.0.0.beta.22
Fetching contributors…

Cannot retrieve contributors at this time

45 lines (33 sloc) 1.103 kb
Feature: line number option
As an RSpec user
I want to run one example identified by the line number
Scenario: standard examples
Given a file named "example_spec.rb" with:
"""
require "rspec/expectations"
describe 9 do
it "should be > 8" do
9.should be > 8
end
it "should be < 10" do
9.should be < 10
end
end
"""
When I run "rspec ./example_spec.rb --line 5 --format doc"
Then the output should contain "1 example, 0 failures"
Then the output should contain "should be > 8"
But the stdout should not contain "should be < 10"
Scenario: one liner
Given a file named "example_spec.rb" with:
"""
require "rspec/expectations"
describe 9 do
it { should be > 8 }
it { should be < 10 }
end
"""
When I run "rspec ./example_spec.rb --line 5 --format doc"
Then the output should contain "1 example, 0 failures"
Then the output should contain "should be > 8"
But the stdout should not contain "should be < 10"
Jump to Line
Something went wrong with that request. Please try again.