|
1 | 1 | # frozen_string_literal: true |
2 | 2 |
|
3 | | -# This file was generated by the `rails generate rspec:install` command. Conventionally, all |
4 | | -# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`. |
5 | | -# The generated `.rspec` file contains `--require spec_helper` which will cause |
6 | | -# this file to always be loaded, without a need to explicitly require it in any |
7 | | -# files. |
8 | | -# |
9 | | -# Given that it is always loaded, you are encouraged to keep this file as |
10 | | -# light-weight as possible. Requiring heavyweight dependencies from this file |
11 | | -# will add to the boot time of your test suite on EVERY test run, even for an |
12 | | -# individual file that may not need all of that loaded. Instead, consider making |
13 | | -# a separate helper file that requires the additional dependencies and performs |
14 | | -# the additional setup, and require it from the spec files that actually need |
15 | | -# it. |
16 | | -# |
17 | | -# See https://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration |
18 | 3 | RSpec.configure do |config| |
19 | | - # rspec-expectations config goes here. You can use an alternate |
20 | | - # assertion/expectation library such as wrong or the stdlib/minitest |
21 | | - # assertions if you prefer. |
| 4 | + ENV["SKIP_TEST_DATABASE_TRUNCATE"] = "true" |
| 5 | + |
22 | 6 | config.expect_with(:rspec) do |expectations| |
23 | | - # This option will default to `true` in RSpec 4. It makes the `description` |
24 | | - # and `failure_message` of custom matchers include text for helper methods |
25 | | - # defined using `chain`, e.g.: |
26 | | - # be_bigger_than(2).and_smaller_than(4).description |
27 | | - # # => "be bigger than 2 and smaller than 4" |
28 | | - # ...rather than: |
29 | | - # # => "be bigger than 2" |
30 | 7 | expectations.include_chain_clauses_in_custom_matcher_descriptions = true |
31 | 8 | end |
32 | 9 |
|
33 | | - # rspec-mocks config goes here. You can use an alternate test double |
34 | | - # library (such as bogus or mocha) by changing the `mock_with` option here. |
35 | 10 | config.mock_with(:rspec) do |mocks| |
36 | | - # Prevents you from mocking or stubbing a method that does not exist on |
37 | | - # a real object. This is generally recommended, and will default to |
38 | | - # `true` in RSpec 4. |
39 | 11 | mocks.verify_partial_doubles = true |
40 | 12 | end |
41 | 13 |
|
42 | | - # This option will default to `:apply_to_host_groups` in RSpec 4 (and will |
43 | | - # have no way to turn it off -- the option exists only for backwards |
44 | | - # compatibility in RSpec 3). It causes shared context metadata to be |
45 | | - # inherited by the metadata hash of host groups and examples, rather than |
46 | | - # triggering implicit auto-inclusion in groups with matching metadata. |
47 | 14 | config.shared_context_metadata_behavior = :apply_to_host_groups |
48 | | - |
49 | | - # The settings below are suggested to provide a good initial experience |
50 | | - # with RSpec, but feel free to customize to your heart's content. |
51 | | - # # This allows you to limit a spec run to individual examples or groups |
52 | | - # # you care about by tagging them with `:focus` metadata. When nothing |
53 | | - # # is tagged with `:focus`, all examples get run. RSpec also provides |
54 | | - # # aliases for `it`, `describe`, and `context` that include `:focus` |
55 | | - # # metadata: `fit`, `fdescribe` and `fcontext`, respectively. |
56 | | - # config.filter_run_when_matching :focus |
57 | | - # |
58 | | - # # Allows RSpec to persist some state between runs in order to support |
59 | | - # # the `--only-failures` and `--next-failure` CLI options. We recommend |
60 | | - # # you configure your source control system to ignore this file. |
61 | | - # config.example_status_persistence_file_path = "spec/examples.txt" |
62 | | - # |
63 | | - # # Limits the available syntax to the non-monkey patched syntax that is |
64 | | - # # recommended. For more details, see: |
65 | | - # # https://rspec.info/features/3-12/rspec-core/configuration/zero-monkey-patching-mode/ |
66 | | - # config.disable_monkey_patching! |
67 | | - # |
68 | | - # # Many RSpec users commonly either run the entire suite or an individual |
69 | | - # # file, and it's useful to allow more verbose output when running an |
70 | | - # # individual spec file. |
71 | | - # if config.files_to_run.one? |
72 | | - # # Use the documentation formatter for detailed output, |
73 | | - # # unless a formatter has already been configured |
74 | | - # # (e.g. via a command-line flag). |
75 | | - # config.default_formatter = "doc" |
76 | | - # end |
77 | | - # |
78 | | - # # Print the 10 slowest examples and example groups at the |
79 | | - # # end of the spec run, to help surface which specs are running |
80 | | - # # particularly slow. |
81 | | - # config.profile_examples = 10 |
82 | | - # |
83 | | - # # Run specs in random order to surface order dependencies. If you find an |
84 | | - # # order dependency and want to debug it, you can fix the order by providing |
85 | | - # # the seed, which is printed after each run. |
86 | | - # # --seed 1234 |
87 | | - # config.order = :random |
88 | | - # |
89 | | - # # Seed global randomization in this process using the `--seed` CLI option. |
90 | | - # # Setting this allows you to use `--seed` to deterministically reproduce |
91 | | - # # test failures related to randomization by passing the same `--seed` value |
92 | | - # # as the one that triggered the failure. |
93 | | - # Kernel.srand config.seed |
94 | 15 | end |
0 commit comments