lib/rubocop/cop/rspec/iterated_expectation.rb in rubocop-rspec-2.25.0 vs lib/rubocop/cop/rspec/iterated_expectation.rb in rubocop-rspec-2.26.0
- old
+ new
@@ -19,26 +19,26 @@
class IteratedExpectation < Base
MSG = 'Prefer using the `all` matcher instead ' \
'of iterating over an array.'
# @!method each?(node)
- def_node_matcher :each?, <<-PATTERN
+ def_node_matcher :each?, <<~PATTERN
(block
(send ... :each)
(args (arg $_))
$(...)
)
PATTERN
# @!method each_numblock?(node)
- def_node_matcher :each_numblock?, <<-PATTERN
+ def_node_matcher :each_numblock?, <<~PATTERN
(numblock
(send ... :each) _ $(...)
)
PATTERN
# @!method expectation?(node)
- def_node_matcher :expectation?, <<-PATTERN
+ def_node_matcher :expectation?, <<~PATTERN
(send (send nil? :expect (lvar %)) :to ...)
PATTERN
def on_block(node)
each?(node) do |arg, body|