You’ve seen how easily you can set configuration options for a particular spec run via the command line. You’ve also seen how to make your favorite options the default using .rspec files.
As convenient as they are, command-line flags are not available for all RSpec options—just the ones you’re likely to change from run to run. For the rest, you’ll need to call RSpec.configure inside one or more Ruby files. You can have multiple configure blocks in your code base; if you do, RSpec will combine the options from all of them.
On a typical project, you’ll put setup in spec/spec_helper.rb and then load this file automatically by adding --require spec_helper to your .rspec file.
Be Careful What You Load from spec_helper.rb
It’s easy ...