From 40b2c2cafa5560e385e5b10e62a44cbc5b6cc4bc Mon Sep 17 00:00:00 2001 From: Earlopain <14981592+Earlopain@users.noreply.github.com> Date: Wed, 21 Aug 2024 12:32:42 +0200 Subject: [PATCH] Don't use deprecated `Cop.registry` in specs Also update cop filtering for https://github.com/rubocop/rubocop/pull/13123 --- spec/project_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/project_spec.rb b/spec/project_spec.rb index e5596a7b7..1161c343e 100644 --- a/spec/project_spec.rb +++ b/spec/project_spec.rb @@ -249,7 +249,7 @@ end let(:existing_cop_names) do - RuboCop::Cop::Cop.registry.without_department(:Test).without_department(:Test2).cops.to_set(&:cop_name) + RuboCop::Cop::Registry.global.reject { |cop| cop.cop_name.start_with?('Test/') }.to_set(&:cop_name) end let(:legacy_cop_names) do