lib/rubocop/cop/rspec/subject_declaration.rb in rubocop-rspec-2.13.2 vs lib/rubocop/cop/rspec/subject_declaration.rb in rubocop-rspec-2.14.0
- old
+ new
@@ -23,10 +23,10 @@
MSG_LET = 'Use subject explicitly rather than using let'
MSG_REDUNDANT = 'Ambiguous declaration of subject'
# @!method offensive_subject_declaration?(node)
def_node_matcher :offensive_subject_declaration?, <<~PATTERN
- (send nil? ${#Subjects.all #Helpers.all} {(sym :subject) (str "subject")} ...)
+ (send nil? ${#Subjects.all #Helpers.all} ({sym str} #Subjects.all) ...)
PATTERN
def on_send(node)
offense = offensive_subject_declaration?(node)
return unless offense