lib/rubocop/cop/rspec/context_method.rb in rubocop-rspec-2.12.1 vs lib/rubocop/cop/rspec/context_method.rb in rubocop-rspec-2.13.0

- old
+ new

@@ -21,20 +21,21 @@ # end # # describe '.foo_bar' do # # ... # end + # class ContextMethod < Base extend AutoCorrector MSG = 'Use `describe` for testing methods.' # @!method context_method(node) def_node_matcher :context_method, <<-PATTERN (block (send #rspec? :context $(str #method_name?) ...) ...) PATTERN - def on_block(node) + 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