lib/rubocop/cop/rspec/context_method.rb in rubocop-rspec-2.25.0 vs lib/rubocop/cop/rspec/context_method.rb in rubocop-rspec-2.26.0

- old
+ new

@@ -28,18 +28,18 @@ extend AutoCorrector MSG = 'Use `describe` for testing methods.' # @!method context_method(node) - def_node_matcher :context_method, <<-PATTERN + def_node_matcher :context_method, <<~PATTERN (block (send #rspec? :context ${(str #method_name?) (dstr (str #method_name?) ...)} ...) ...) PATTERN - def on_block(node) # rubocop:disable InternalAffairs/NumblockHandler + def on_block(node) # rubocop:disable InternalAffairs/NumblockHandler context_method(node) do |context| add_offense(context) do |corrector| corrector.replace(node.send_node.loc.selector, 'describe') end end