lib/rubocop/cop/rspec/receive_never.rb in rubocop-rspec-2.12.1 vs lib/rubocop/cop/rspec/receive_never.rb in rubocop-rspec-2.13.0
- old
+ new
@@ -4,15 +4,14 @@
module Cop
module RSpec
# Prefer `not_to receive(...)` over `receive(...).never`.
#
# @example
+ # # bad
+ # expect(foo).to receive(:bar).never
#
- # # bad
- # expect(foo).to receive(:bar).never
- #
- # # good
- # expect(foo).not_to receive(:bar)
+ # # good
+ # 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