Sha256: 3486375f571f37d6a01c1c367e6a60cc57750013cc3d99b14876d796a6d2513f

Contents?: true

Size: 1.11 KB

Versions: 12

Compression:

Stored size: 1.11 KB

Contents

Feature: line number option

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

    rspec path/to/example_spec.rb --line 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 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"

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
vim-jar-0.1.2.0001 bundler/ruby/1.8/gems/rspec-core-2.1.0/features/command_line/line_number_option.feature
vim-jar-0.1.2 bundler/ruby/1.8/gems/rspec-core-2.1.0/features/command_line/line_number_option.feature
vim-jar-0.1.1 bundler/ruby/1.8/gems/rspec-core-2.1.0/features/command_line/line_number_option.feature
vim-jar-0.1.0 bundler/ruby/1.8/gems/rspec-core-2.1.0/features/command_line/line_number_option.feature
rspec-core-2.3.1 features/command_line/line_number_option.feature
rspec-core-2.3.0 features/command_line/line_number_option.feature
vim-jar-0.0.3 bundler/ruby/1.8/gems/rspec-core-2.1.0/features/command_line/line_number_option.feature
rspec-core-2.2.1 features/command_line/line_number_option.feature
vim-jar-0.0.2 bundler/ruby/1.8/gems/rspec-core-2.1.0/features/command_line/line_number_option.feature
vim-jar-0.0.1 bundler/ruby/1.8/gems/rspec-core-2.1.0/features/command_line/line_number_option.feature
rspec-core-2.2.0 features/command_line/line_number_option.feature
rspec-core-2.1.0 features/command_line/line_number_option.feature