Skip to content

Commit

Permalink
fixup! Move on_new_investigation to where it belongs
Browse files Browse the repository at this point in the history
  • Loading branch information
pirj committed Nov 2, 2020
1 parent f8fffaf commit ef28dfe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 7 additions & 0 deletions lib/rubocop/cop/rspec/base.rb
Expand Up @@ -14,6 +14,13 @@ class Base < ::RuboCop::Cop::Base
def self.inherited(subclass) # rubocop:disable Lint/MissingSuper
RuboCop::Cop::Base.inherited(subclass)
end

# Set the config for dynamic DSL configuration-aware helpers
# that have no other means of accessing the configuration.
def on_new_investigation
super
RuboCop::RSpec::Language.config = config['RSpec']['Language']
end
end
end
end
Expand Down
5 changes: 0 additions & 5 deletions lib/rubocop/rspec/language.rb
Expand Up @@ -19,11 +19,6 @@ class << self
attr_accessor :config
end

def on_new_investigation
super
Language.config = config['RSpec']['Language']
end

def_node_matcher :rspec?, '{(const {nil? cbase} :RSpec) nil?}'

def_node_matcher :example_group?, block_pattern('#ExampleGroups.all')
Expand Down

0 comments on commit ef28dfe

Please sign in to comment.