diff --git a/lib/rubocop/cop/rspec/before_after_all.rb b/lib/rubocop/cop/rspec/before_after_all.rb index 7c3298c8fb..b15fb2a625 100644 --- a/lib/rubocop/cop/rspec/before_after_all.rb +++ b/lib/rubocop/cop/rspec/before_after_all.rb @@ -30,11 +30,11 @@ class BeforeAfterAll < Base '`use_transactional_fixtures` is enabled, then records created ' \ 'in `%s` are not automatically rolled back.' - RESTRICT_ON_SEND = %i[before after].freeze + RESTRICT_ON_SEND = Set[:before, :after].freeze # @!method before_or_after_all(node) def_node_matcher :before_or_after_all, <<-PATTERN - $(send _ {:before :after} (sym {:all :context})) + $(send _ RESTRICT_ON_SEND (sym {:all :context})) PATTERN def on_send(node)