O'Reilly logo

Effective Testing with RSpec 3 by Myron Marston, Ian Dees

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Command-Line Configuration

To see all the available command-line options, run rspec --help. You’ll get a pretty big list of settings, some of which you’ve already used in this book. We’re not going to go over them all here, but there are a few we’d like to highlight.

Environment Options

Sometimes, you need to control how RSpec loads your Ruby code. For instance, you may be experimenting with a locally modified version of a library—in that case, you’d want RSpec to load your custom version of that library instead of the default one.

The first two options listed in the --help output are for these kinds of environment customizations:

 -I PATH Specify PATH to add to $LOAD_PATH (may
  be used more than once).
 -r, --require PATH Require a file. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required