lib/rubocop/cop/rspec/implicit_block_expectation.rb in rubocop-rspec-2.25.0 vs lib/rubocop/cop/rspec/implicit_block_expectation.rb in rubocop-rspec-2.26.0
- old
+ new
@@ -20,21 +20,21 @@
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
+ 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
+ def_node_matcher :implicit_expect, <<~PATTERN
$(send nil? {:is_expected :should :should_not} ...)
PATTERN
def on_send(node)
implicit_expect(node) do |implicit_expect|