File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 1
1
# frozen_string_literal: true
2
2
3
3
require 'rubocop'
4
-
5
4
require 'rubocop/rspec/support'
6
5
7
6
if ENV [ 'COVERAGE' ] == 'true'
@@ -14,16 +13,17 @@ module SpecHelper
14
13
end
15
14
16
15
spec_helper_glob = File . expand_path ( '{support,shared}/*.rb' , __dir__ )
17
- Dir . glob ( spec_helper_glob ) . map ( &method ( :require ) )
16
+ Dir . glob ( spec_helper_glob ) . sort . each ( &method ( :require ) )
18
17
19
18
RSpec . configure do |config |
19
+ # Set metadata so smoke tests are run on all cop specs
20
20
config . define_derived_metadata ( file_path : %r{/spec/rubocop/cop/} ) do |meta |
21
21
meta [ :type ] = :cop_spec
22
22
end
23
23
24
24
# Include config shared context for all cop specs
25
- config . define_derived_metadata ( type : :cop_spec ) do |metadata |
26
- metadata [ :config ] = true
25
+ config . define_derived_metadata ( type : :cop_spec ) do |meta |
26
+ meta [ :config ] = true
27
27
end
28
28
29
29
config . order = :random
@@ -46,6 +46,5 @@ module SpecHelper
46
46
end
47
47
48
48
$LOAD_PATH. unshift ( File . join ( File . dirname ( __FILE__ ) , '..' , 'lib' ) )
49
- $LOAD_PATH. unshift ( File . dirname ( __FILE__ ) )
50
49
51
50
require 'rubocop-rspec'
You can’t perform that action at this time.
0 commit comments