|
| 1 | +# frozen_string_literal: true |
| 2 | + |
1 | 3 | # This file was generated by the `rspec --init` command. Conventionally, all |
2 | 4 | # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`. |
3 | 5 | # The generated `.rspec` file contains `--require spec_helper` which will cause |
|
13 | 15 | # it. |
14 | 16 | # |
15 | 17 | # See https://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration |
| 18 | + |
| 19 | +require "simplecov" |
| 20 | +require "simplecov-console" |
| 21 | +require "simplecov_json_formatter" |
| 22 | + |
| 23 | +SimpleCov.start do |
| 24 | + add_filter "/spec/" |
| 25 | + enable_coverage :branch |
| 26 | + formatter SimpleCov::Formatter::MultiFormatter.new( |
| 27 | + [ |
| 28 | + SimpleCov::Formatter::JSONFormatter, # for codeclimate |
| 29 | + SimpleCov::Formatter::Console # for stdout |
| 30 | + ] |
| 31 | + ) |
| 32 | +end |
| 33 | + |
| 34 | +require "bundler/setup" |
| 35 | +require "const_set_p" |
| 36 | + |
16 | 37 | RSpec.configure do |config| |
17 | 38 | # rspec-expectations config goes here. You can use an alternate |
18 | 39 | # assertion/expectation library such as wrong or the stdlib/minitest |
|
44 | 65 | # triggering implicit auto-inclusion in groups with matching metadata. |
45 | 66 | config.shared_context_metadata_behavior = :apply_to_host_groups |
46 | 67 |
|
47 | | -# The settings below are suggested to provide a good initial experience |
48 | | -# with RSpec, but feel free to customize to your heart's content. |
49 | | -=begin |
50 | 68 | # This allows you to limit a spec run to individual examples or groups |
51 | 69 | # you care about by tagging them with `:focus` metadata. When nothing |
52 | 70 | # is tagged with `:focus`, all examples get run. RSpec also provides |
|
94 | 112 | # test failures related to randomization by passing the same `--seed` value |
95 | 113 | # as the one that triggered the failure. |
96 | 114 | Kernel.srand config.seed |
97 | | -=end |
98 | 115 | end |
0 commit comments