lib/rubocop/cop/rspec/void_expect.rb in rubocop-rspec-2.2.0 vs lib/rubocop/cop/rspec/void_expect.rb in rubocop-rspec-2.3.0
- old
+ new
@@ -14,13 +14,15 @@
class VoidExpect < Base
MSG = 'Do not use `expect()` without `.to` or `.not_to`. ' \
'Chain the methods or remove it.'
RESTRICT_ON_SEND = %i[expect].freeze
+ # @!method expect?(node)
def_node_matcher :expect?, <<-PATTERN
(send nil? :expect ...)
PATTERN
+ # @!method expect_block?(node)
def_node_matcher :expect_block?, <<-PATTERN
(block #expect? (args) _body)
PATTERN
def on_send(node)