Sha256: bc0d198730a3a6029a659530bc5071bf3f5c89c8c39f59d1524e1bf5b397d622

Contents?: true

Size: 1.1 KB

Versions: 5

Compression:

Stored size: 1.1 KB

Contents

Feature: --line_number option

  To run a single example or group, you can use the --line_number option:

      rspec path/to/example_spec.rb --line_number 37

  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_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"

  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_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

5 entries across 5 versions & 2 rubygems

Version Path
messagebus_ruby_api-0.4.7 spec/ruby/1.9.1/gems/rspec-core-2.5.1/features/command_line/line_number_option.feature
messagebus_ruby_api-0.4.4 spec/ruby/1.9.1/gems/rspec-core-2.5.1/features/command_line/line_number_option.feature
rspec-core-2.5.2 features/command_line/line_number_option.feature
rspec-core-2.5.1 features/command_line/line_number_option.feature
rspec-core-2.5.0 features/command_line/line_number_option.feature