lib/rubocop/cop/rspec/expect_in_hook.rb in rubocop-rspec-2.0.0.pre vs lib/rubocop/cop/rspec/expect_in_hook.rb in rubocop-rspec-2.0.0
- old
+ new
@@ -21,10 +21,10 @@
# expect(something).to eq 'foo'
# end
class ExpectInHook < Base
MSG = 'Do not use `%<expect>s` in `%<hook>s` hook'
- def_node_search :expectation, Expectations::ALL.send_pattern
+ def_node_search :expectation, send_pattern('#Expectations.all')
def on_block(node)
return unless hook?(node)
return if node.body.nil?