Sha256: debd14fdf99e6e19f78f2d34d962f3e602b59ba931ad7c2aa42ac2bdd821ecfa

Contents?: true

Size: 1.2 KB

Versions: 53

Compression:

Stored size: 1.2 KB

Contents

Feature: default_path

  As of rspec-2.7, 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:
      """ruby
      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:
      """ruby
      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

53 entries across 53 versions & 13 rubygems

Version Path
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.4.0/gems/rspec-core-2.14.8/features/configuration/default_path.feature
vagrant-unbundled-1.9.5.1 vendor/bundle/ruby/2.4.0/gems/rspec-core-2.14.8/features/configuration/default_path.feature
vagrant-unbundled-1.9.1.1 vendor/bundle/ruby/2.4.0/gems/rspec-core-2.14.8/features/configuration/default_path.feature
vagrant-unbundled-1.8.5.2 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/features/configuration/default_path.feature
vagrant-unbundled-1.8.5.1 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/features/configuration/default_path.feature
vagrant-unbundled-1.8.4.2 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/features/configuration/default_path.feature
vagrant-unbundled-1.8.4.1 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/features/configuration/default_path.feature
vagrant-unbundled-1.8.1.1 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/features/configuration/default_path.feature
vagrant-cloudstack-1.1.0 vendor/bundle/gems/rspec-core-2.14.8/features/configuration/default_path.feature
judge-2.0.5 vendor/bundle/ruby/2.1.0/gems/rspec-core-2.13.0/features/configuration/default_path.feature
rspec-core-2.99.2 features/configuration/default_path.feature
dxruby_rp5-0.0.4 spec/vendor/rspec-core-2.14.7/features/configuration/default_path.feature
rspec-core-2.99.1 features/configuration/default_path.feature
rspec-core-2.99.0 features/configuration/default_path.feature
rspec-core-2.99.0.rc1 features/configuration/default_path.feature
rspec-core-2.14.8 features/configuration/default_path.feature
rspec-core-3.0.0.beta2 features/configuration/default_path.feature
rspec-core-2.99.0.beta2 features/configuration/default_path.feature
mango-0.8.0 vendor/bundler/ruby/2.1.0/gems/rspec-core-2.14.7/features/configuration/default_path.feature
mango-0.7.1 vendor/bundler/ruby/2.0.0/gems/rspec-core-2.14.7/features/configuration/default_path.feature