lib/rubocop/cop/rspec/overwriting_setup.rb in rubocop-rspec-2.18.1 vs lib/rubocop/cop/rspec/overwriting_setup.rb in rubocop-rspec-2.19.0
- old
+ new
@@ -24,10 +24,12 @@
#
class OverwritingSetup < Base
MSG = '`%<name>s` is already defined.'
# @!method setup?(node)
- def_node_matcher :setup?, block_pattern('{#Helpers.all #Subjects.all}')
+ def_node_matcher :setup?, <<~PATTERN
+ (block (send nil? {#Helpers.all #Subjects.all} ...) ...)
+ PATTERN
# @!method first_argument_name(node)
def_node_matcher :first_argument_name, '(send _ _ ({str sym} $_))'
def on_block(node) # rubocop:disable InternalAffairs/NumblockHandler