File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,13 @@ class Base < ::RuboCop::Cop::Base
1414 def self . inherited ( subclass ) # rubocop:disable Lint/MissingSuper
1515 RuboCop ::Cop ::Base . inherited ( subclass )
1616 end
17+
18+ # Set the config for dynamic DSL configuration-aware helpers
19+ # that have no other means of accessing the configuration.
20+ def on_new_investigation
21+ super
22+ RuboCop ::RSpec ::Language . config = config [ 'RSpec' ] [ 'Language' ]
23+ end
1724 end
1825 end
1926 end
Original file line number Diff line number Diff line change @@ -19,11 +19,6 @@ class << self
1919 attr_accessor :config
2020 end
2121
22- def on_new_investigation
23- super
24- Language . config = config [ 'RSpec' ] [ 'Language' ]
25- end
26-
2722 def_node_matcher :rspec? , '{(const {nil? cbase} :RSpec) nil?}'
2823
2924 def_node_matcher :example_group? , block_pattern ( '#ExampleGroups.all' )
You can’t perform that action at this time.
0 commit comments