main
 1# This file was generated by the `rspec --init` command. Conventionally, all
 2# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
 3# The generated `.rspec` file contains `--require spec_helper` which will cause this
 4# file to always be loaded, without a need to explicitly require it in any files.
 5#
 6# Given that it is always loaded, you are encouraged to keep this file as
 7# light-weight as possible. Requiring heavyweight dependencies from this file
 8# will add to the boot time of your test suite on EVERY test run, even for an
 9# individual file that may not need all of that loaded. Instead, make a
10# separate helper file that requires this one and then use it only in the specs
11# that actually need it.
12#
13# The `.rspec` file also contains a few flags that are not defaults but that
14# users commonly want.
15#
16# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
17require 'gol'
18
19RSpec.configure do |config|
20  # The settings below are suggested to provide a good initial experience
21  # with RSpec, but feel free to customize to your heart's content.
22  # These two settings work together to allow you to limit a spec run
23  # to individual examples or groups you care about by tagging them with
24  # `:focus` metadata. When nothing is tagged with `:focus`, all examples
25  # get run.
26  config.filter_run :focus
27  config.run_all_when_everything_filtered = true
28
29  # Many RSpec users commonly either run the entire suite or an individual
30  # file, and it's useful to allow more verbose output when running an
31  # individual spec file.
32  if config.files_to_run.one?
33    # Use the documentation formatter for detailed output,
34    # unless a formatter has already been configured
35    # (e.g. via a command-line flag).
36    config.default_formatter = 'doc'
37  end
38
39  # Print the 10 slowest examples and example groups at the
40  # end of the spec run, to help surface which specs are running
41  # particularly slow.
42  #config.profile_examples = 10
43
44  # Run specs in random order to surface order dependencies. If you find an
45  # order dependency and want to debug it, you can fix the order by providing
46  # the seed, which is printed after each run.
47  #     --seed 1234
48  config.order = :random
49
50  # Seed global randomization in this process using the `--seed` CLI option.
51  # Setting this allows you to use `--seed` to deterministically reproduce
52  # test failures related to randomization by passing the same `--seed` value
53  # as the one that triggered the failure.
54  Kernel.srand config.seed
55
56  # rspec-expectations config goes here. You can use an alternate
57  # assertion/expectation library such as wrong or the stdlib/minitest
58  # assertions if you prefer.
59  config.expect_with :rspec do |expectations|
60    # Enable only the newer, non-monkey-patching expect syntax.
61    # For more details, see:
62    #   - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
63    expectations.syntax = [:should, :expect]
64  end
65
66  # rspec-mocks config goes here. You can use an alternate test double
67  # library (such as bogus or mocha) by changing the `mock_with` option here.
68  config.mock_with :rspec do |mocks|
69    # Enable only the newer, non-monkey-patching expect syntax.
70    # For more details, see:
71    #   - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
72    mocks.syntax = [:should, :expect]
73
74    # Prevents you from mocking or stubbing a method that does not exist on
75    # a real object. This is generally recommended.
76    mocks.verify_partial_doubles = true
77  end
78end