lib/rubocop/cop/rspec/receive_never.rb in rubocop-rspec-2.1.0 vs lib/rubocop/cop/rspec/receive_never.rb in rubocop-rspec-2.2.0
- old
+ new
@@ -14,9 +14,10 @@
# expect(foo).not_to receive(:bar)
#
class ReceiveNever < Base
extend AutoCorrector
MSG = 'Use `not_to receive` instead of `never`.'
+ RESTRICT_ON_SEND = %i[never].freeze
def_node_search :method_on_stub?, '(send nil? :receive ...)'
def on_send(node)
return unless node.method?(:never) && method_on_stub?(node)