lib/rubocop/cop/rspec/overwriting_setup.rb in rubocop-rspec-2.2.0 vs lib/rubocop/cop/rspec/overwriting_setup.rb in rubocop-rspec-2.3.0
- old
+ new
@@ -22,11 +22,13 @@
# 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)
return unless example_group_with_body?(node)