From b918d5377ac710a266bb50e863c47d529ced728c Mon Sep 17 00:00:00 2001 From: Phil Pirozhkov Date: Sun, 23 Oct 2022 12:50:47 +0300 Subject: [PATCH] Simplify node pattern --- lib/rubocop/cop/rspec/subject_declaration.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rubocop/cop/rspec/subject_declaration.rb b/lib/rubocop/cop/rspec/subject_declaration.rb index a79189025..e3d588b42 100644 --- a/lib/rubocop/cop/rspec/subject_declaration.rb +++ b/lib/rubocop/cop/rspec/subject_declaration.rb @@ -25,7 +25,7 @@ class SubjectDeclaration < Base # @!method offensive_subject_declaration?(node) def_node_matcher :offensive_subject_declaration?, <<~PATTERN - (send nil? ${#Subjects.all #Helpers.all} {(sym #Subjects.all) (str #Subjects.all)} ...) + (send nil? ${#Subjects.all #Helpers.all} ({sym str} #Subjects.all) ...) PATTERN def on_send(node)