✨ Recognize teammates in slack by awarding them sparkles!
1# frozen_string_literal: true
2
3RSpec.configure do |config|
4 # Use the recommended non-monkey patched syntax.
5 config.disable_monkey_patching!
6
7 # Use and configure rspec-expectations.
8 config.expect_with :rspec do |expectations|
9 # This option will default to `true` in RSpec 4.
10 expectations.include_chain_clauses_in_custom_matcher_descriptions = true
11 end
12
13 # Use and configure rspec-mocks.
14 config.mock_with :rspec do |mocks|
15 # Prevents you from mocking or stubbing a method that does not exist on a
16 # real object.
17 mocks.verify_partial_doubles = true
18 end
19
20 # This option will default to `:apply_to_host_groups` in RSpec 4.
21 config.shared_context_metadata_behavior = :apply_to_host_groups
22
23 # Limit a spec run to individual examples or groups you care about by tagging
24 # them with `:focus` metadata. When nothing is tagged with `:focus`, all
25 # examples get run.
26 #
27 # RSpec also provides aliases for `it`, `describe`, and `context` that include
28 # `:focus` metadata: `fit`, `fdescribe` and `fcontext`, respectively.
29 config.filter_run_when_matching :focus
30
31 # Allow RSpec to persist some state between runs in order to support the
32 # `--only-failures` and `--next-failure` CLI options. We recommend you
33 # configure your source control system to ignore this file.
34 config.example_status_persistence_file_path = "spec/examples.txt"
35
36 # Uncomment this to enable warnings. This is recommended, but in some cases
37 # may be too noisy due to issues in dependencies.
38 # config.warnings = true
39
40 # Show more verbose output when running an individual spec file.
41 if config.files_to_run.one?
42 config.default_formatter = "doc"
43 end
44
45 # Print the 10 slowest examples and example groups at the end of the spec run,
46 # to help surface which specs are running particularly slow.
47 config.profile_examples = 10
48
49 # Run specs in random order to surface order dependencies. If you find an
50 # order dependency and want to debug it, you can fix the order by providing
51 # the seed, which is printed after each run:
52 #
53 # --seed 1234
54 config.order = :random
55
56 # Seed global randomization in this process using the `--seed` CLI option.
57 # This allows you to use `--seed` to deterministically reproduce test failures
58 # related to randomization by passing the same `--seed` value as the one that
59 # triggered the failure.
60 Kernel.srand config.seed
61end