lib/rubocop/cop/rspec/implicit_block_expectation.rb in rubocop-rspec-2.2.0 vs lib/rubocop/cop/rspec/implicit_block_expectation.rb in rubocop-rspec-2.3.0

- old
+ new

@@ -18,18 +18,21 @@ # end class ImplicitBlockExpectation < Base MSG = 'Avoid implicit block expectations.' RESTRICT_ON_SEND = %i[is_expected should should_not].freeze + # @!method lambda?(node) def_node_matcher :lambda?, <<-PATTERN { (send (const nil? :Proc) :new) (send nil? {:proc :lambda}) } PATTERN + # @!method lambda_subject?(node) def_node_matcher :lambda_subject?, '(block #lambda? ...)' + # @!method implicit_expect(node) def_node_matcher :implicit_expect, <<-PATTERN $(send nil? {:is_expected :should :should_not} ...) PATTERN def on_send(node)