class RSpec::Core::Configuration

Stores runtime configuration information.

Configuration options are loaded from multiple files and joined together with command-line switches and the ‘SPEC_OPTS` environment variable.

Precedence order (where later entries overwrite earlier entries on conflicts):

* Global (`$XDG_CONFIG_HOME/rspec/options`, or `~/.rspec` if it does
  not exist)
* Project-specific (`./.rspec`)
* Local (`./.rspec-local`)
* Command-line options
* `SPEC_OPTS`

For example, an option set in the local file will override an option set in your global file.

The global, project-specific and local files can all be overridden with a separate custom file using the –options command-line parameter.

@example Standard settings

RSpec.configure do |c|
  c.drb          = true
  c.drb_port     = 1234
  c.default_path = 'behavior'
end

@example Hooks

RSpec.configure do |c|
  c.before(:suite)   { establish_connection }
  c.before(:example) { log_in_as :authorized }
  c.around(:example) { |ex| Database.transaction(&ex) }
end

@see RSpec.configure @see Hooks