Sha256: 36d4114362dcc0a3a5f3adc2913cd2c2e6dcc6582d876f2681d29d842521d908
Contents?: true
Size: 1.55 KB
Versions: 1
Compression:
Stored size: 1.55 KB
Contents
Feature: --line_number option To run a examples or groups by line numbers, one can use the --line_number option: rspec path/to/example_spec.rb --line_number 37 This option can be specified multiple times. Scenario: standard examples Given a file named "example_spec.rb" with: """ruby require "rspec/expectations" describe 9 do it "should be > 8" do expect(9).to be > 8 end it "should be < 10" do expect(9).to be < 10 end it "should be 3 squared" do expect(9).to be 3*3 end end """ When I run `rspec example_spec.rb --line_number 5 --format doc` Then the examples should all pass And the output should contain "should be > 8" But the output should not contain "should be < 10" And the output should not contain "should be 3*3" When I run `rspec example_spec.rb --line_number 5 --line_number 9 --format doc` Then the examples should all pass And the output should contain "should be > 8" And the output should contain "should be < 10" But the output should not contain "should be 3*3" Scenario: one liner Given a file named "example_spec.rb" with: """ruby require "rspec/expectations" describe 9 do it { should be > 8 } it { should be < 10 } end """ When I run `rspec example_spec.rb --line_number 5 --format doc` Then the examples should all pass Then the output should contain "should be > 8" But the output should not contain "should be < 10"
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rspec-core-3.0.0.beta1 | features/command_line/line_number_option.feature |