Sha256: e5503f987c593f833cd5e363623c52c156f74e2f682ac232bc2bf41ff8139a05

Contents?: true

Size: 1.22 KB

Versions: 12

Compression:

Stored size: 1.22 KB

Contents

Feature: default_path

  As of rspec-2.7 (not yet released), you can just type `rspec` to run all
  specs that live in the `spec` directory.

  This is supported by a `--default_path` option, which is set to `spec` by
  default. If you prefer to keep your specs in a different directory, or assign
  an individual file to `--default_path`, you can do so on the command line or
  in a configuration file (`.rspec`, `~/.rspec`, or a custom file).

  NOTE: this option is not supported on `RSpec.configuration`, as it needs to
  be set before spec files are loaded.

  Scenario: run `rspec` with default default_path (`spec` directory)
    Given a file named "spec/example_spec.rb" with:
      """
      describe "an example" do
        it "passes" do
        end
      end
      """
    When I run `rspec`
    Then the output should contain "1 example, 0 failures"
    
  Scenario: run `rspec` with customized default_path
    Given a file named ".rspec" with:
      """
      --default_path behavior
      """
    Given a file named "behavior/example_spec.rb" with:
      """      
      describe "an example" do
        it "passes" do
        end
      end
      """
    When I run `rspec`
    Then the output should contain "1 example, 0 failures"

Version data entries

12 entries across 12 versions & 3 rubygems

Version Path
horseman-0.0.4 vendor/ruby/1.9.1/gems/rspec-core-2.7.1/features/configuration/default_path.feature
horseman-0.0.3 vendor/ruby/1.9.1/gems/rspec-core-2.7.1/features/configuration/default_path.feature
horseman-0.0.2 vendor/ruby/1.9.1/gems/rspec-core-2.7.1/features/configuration/default_path.feature
nutshell-crm-0.0.6.alpha vendor/bundle/gems/rspec-core-2.7.1/features/configuration/default_path.feature
nutshell-crm-0.0.5 vendor/bundle/gems/rspec-core-2.7.1/features/configuration/default_path.feature
nutshell-crm-0.0.4 vendor/bundle/gems/rspec-core-2.7.1/features/configuration/default_path.feature
nutshell-crm-0.0.3 vendor/bundle/gems/rspec-core-2.7.1/features/configuration/default_path.feature
nutshell-crm-0.0.2 vendor/bundle/gems/rspec-core-2.7.1/features/configuration/default_path.feature
nutshell-crm-0.0.1 vendor/bundle/gems/rspec-core-2.7.1/features/configuration/default_path.feature
rspec-core-2.7.1 features/configuration/default_path.feature
rspec-core-2.7.0 features/configuration/default_path.feature
rspec-core-2.7.0.rc1 features/configuration/default_path.feature