Sha256: c6e9eaab42f6aeeaa935b8145a9cdd43aa3205c2bafdbf38530ae9eb22241dde

Contents?: true

Size: 1.02 KB

Versions: 207

Compression:

Stored size: 1.02 KB

Contents

The `rspec` command comes with several options you can use to customize RSpec's
behavior, including output formats, filtering examples, etc.

For a full list of options, run the `rspec` command with the `--help` flag:

    $ rspec --help

### Run with `ruby`

Generally, life is simpler if you just use the `rspec` command. If you must use the `ruby`
command, however, you'll want to do the following:

* `require 'rspec/autorun'`

This tells RSpec to run your examples.  Do this in any file that you are
passing to the `ruby` command.

* Update the `LOAD_PATH`

It is conventional to put configuration in and require assorted support files
from `spec/spec_helper.rb`. It is also conventional to require that file from
the spec files using `require 'spec_helper'`. This works because RSpec
implicitly adds the `spec` directory to the `LOAD_PATH`. It also adds `lib`, so
your implementation files will be on the `LOAD_PATH` as well.

If you're using the `ruby` command, you'll need to do this yourself:

    ruby -Ilib -Ispec path/to/spec.rb

Version data entries

207 entries across 152 versions & 26 rubygems

Version Path
rspec-core-2.14.5 features/command_line/README.md
rspec-core-2.14.4 features/command_line/README.md
rspec-core-2.14.3 features/command_line/README.md
tnargav-1.2.3 vendor/bundle/ruby/1.9.1/gems/rspec-core-2.11.1/features/command_line/README.md
rspec-core-2.14.2 features/command_line/README.md
rspec-core-2.14.1 features/command_line/README.md
rspec-core-2.14.0 features/command_line/README.md
classiccms-0.7.2 vendor/bundle/gems/rspec-core-2.9.0/features/command_line/README.md
classiccms-0.7.2 vendor/bundle/gems/rspec-core-2.10.0/features/command_line/README.md
classiccms-0.7.1 vendor/bundle/gems/rspec-core-2.10.0/features/command_line/README.md
classiccms-0.7.1 vendor/bundle/gems/rspec-core-2.9.0/features/command_line/README.md
sshp-0.0.2 vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/command_line/README.md
sshp-0.0.1 vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/command_line/README.md
rspec-core-2.14.0.rc1 features/command_line/README.md
classiccms-0.7.0 vendor/bundle/gems/rspec-core-2.10.0/features/command_line/README.md
classiccms-0.7.0 vendor/bundle/gems/rspec-core-2.9.0/features/command_line/README.md
sidekiq-statsd-0.1.1 vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/command_line/README.md
sidekiq-statsd-0.1.0 vendor/ruby/1.9.1/gems/rspec-core-2.13.1/features/command_line/README.md
vagrant-actionio-0.0.9 vendor/bundle/gems/rspec-core-2.13.0/features/command_line/README.md
rspec-core-2.13.1 features/command_line/README.md