File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 1
1
# frozen_string_literal: true
2
2
3
+ # For code coverage measurements to work properly, `SimpleCov` should be loaded
4
+ # and started before any application code is loaded.
5
+ if ENV . fetch ( 'COVERAGE' , nil ) == 'true'
6
+ require 'simplecov'
7
+ SimpleCov . start
8
+ end
9
+
3
10
require 'rubocop-rails'
4
11
require 'rubocop/rspec/support'
5
12
require_relative 'support/file_helper'
9
16
# in ./support/ and its subdirectories.
10
17
Dir [ "#{ File . dirname ( __FILE__ ) } /support/**/*.rb" ] . sort . each { |f | require f }
11
18
12
- if ENV . fetch ( 'COVERAGE' , nil ) == 'true'
13
- require 'simplecov'
14
- SimpleCov . start
15
- end
16
-
17
19
RSpec . configure do |config |
18
20
config . shared_context_metadata_behavior = :apply_to_host_groups
19
21
config . filter_run_when_matching :focus
You can’t perform that action at this time.
0 commit comments