lib/rubocop/cop/rspec/expect_in_hook.rb in rubocop-rspec-2.18.1 vs lib/rubocop/cop/rspec/expect_in_hook.rb in rubocop-rspec-2.19.0
- old
+ new
@@ -23,10 +23,10 @@
#
class ExpectInHook < Base
MSG = 'Do not use `%<expect>s` in `%<hook>s` hook'
# @!method expectation(node)
- def_node_search :expectation, send_pattern('#Expectations.all')
+ def_node_search :expectation, '(send nil? #Expectations.all ...)'
def on_block(node) # rubocop:disable InternalAffairs/NumblockHandler
return unless hook?(node)
return if node.body.nil?