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
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.4.0/gems/rspec-core-2.14.8/features/command_line/README.md
vagrant-unbundled-1.9.5.1 vendor/bundle/ruby/2.4.0/gems/rspec-core-2.14.8/features/command_line/README.md
vagrant-unbundled-1.9.1.1 vendor/bundle/ruby/2.4.0/gems/rspec-core-2.14.8/features/command_line/README.md
vagrant-unbundled-1.8.5.2 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/features/command_line/README.md
vagrant-unbundled-1.8.5.1 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/features/command_line/README.md
vagrant-unbundled-1.8.4.2 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/features/command_line/README.md
vagrant-unbundled-1.8.4.1 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/features/command_line/README.md
vagrant-unbundled-1.8.1.1 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/features/command_line/README.md
classiccms-0.7.5 vendor/bundle/gems/rspec-core-2.10.0/features/command_line/README.md
classiccms-0.7.5 vendor/bundle/gems/rspec-core-2.9.0/features/command_line/README.md
classiccms-0.7.4 vendor/bundle/gems/rspec-core-2.9.0/features/command_line/README.md
classiccms-0.7.4 vendor/bundle/gems/rspec-core-2.10.0/features/command_line/README.md
classiccms-0.7.3 vendor/bundle/gems/rspec-core-2.9.0/features/command_line/README.md
classiccms-0.7.3 vendor/bundle/gems/rspec-core-2.10.0/features/command_line/README.md
vagrant-cloudstack-1.1.0 vendor/bundle/gems/rspec-core-2.14.8/features/command_line/README.md
judge-2.0.5 vendor/bundle/ruby/2.1.0/gems/rspec-core-2.13.0/features/command_line/README.md
rspec-core-2.99.2 features/command_line/README.md
dxruby_rp5-0.0.4 spec/vendor/rspec-core-2.14.7/features/command_line/README.md
rspec-core-2.99.1 features/command_line/README.md
rspec-core-2.99.0 features/command_line/README.md