lib/rubocop/cop/rspec/overwriting_setup.rb in rubocop-rspec-2.12.1 vs lib/rubocop/cop/rspec/overwriting_setup.rb in rubocop-rspec-2.13.0
- old
+ new
@@ -19,19 +19,20 @@
# # good
# subject(:test) { something }
# let(:foo) { bar }
# let(:baz) { baz }
# let!(:other) { other }
+ #
class OverwritingSetup < Base
MSG = '`%<name>s` is already defined.'
# @!method setup?(node)
def_node_matcher :setup?, block_pattern('{#Helpers.all #Subjects.all}')
# @!method first_argument_name(node)
def_node_matcher :first_argument_name, '(send _ _ ({str sym} $_))'
- def on_block(node)
+ def on_block(node) # rubocop:disable InternalAffairs/NumblockHandler
return unless example_group_with_body?(node)
find_duplicates(node.body) do |duplicate, name|
add_offense(
duplicate,