lib/rubocop/cop/rspec/described_class.rb in rubocop-rspec-1.42.0 vs lib/rubocop/cop/rspec/described_class.rb in rubocop-rspec-1.43.0

- old
+ new

@@ -52,11 +52,11 @@ # controller(ApplicationController) do # include MyConcern # end # end # - class DescribedClass < Cop + class DescribedClass < Base extend AutoCorrector include ConfigurableEnforcedStyle DESCRIBED_CLASS = 'described_class' MSG = 'Use `%<replacement>s` instead of `%<src>s`.' @@ -140,10 +140,10 @@ def offensive?(node) if style == :described_class offensive_described_class?(node) else - node.send_type? && node.method_name == :described_class + node.send_type? && node.method?(:described_class) end end def offensive_described_class?(node) return unless node.const_type?