Skip to content

Commit ef28dfe

Browse files
committed
fixup! Move on_new_investigation to where it belongs
1 parent f8fffaf commit ef28dfe

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

lib/rubocop/cop/rspec/base.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff 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

lib/rubocop/rspec/language.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff 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')

0 commit comments

Comments
 (0)