Browse Source

Maintenance: Update dependency rubocop-rspec to v2.20.0

renovatebot 1 year ago
parent
commit
b33d5c88a3

+ 4 - 0
.rubocop/default.yml

@@ -391,6 +391,10 @@ RSpec/Rails/InferredSpecType:
   Description: 'Identifies redundant spec type.'
   Enabled: false  # We use types to add DSL to rspec.
 
+RSpec/IndexedLet:
+  Description: 'Do not set up test data using indexes (e.g., `item_1`, `item_2`).'
+  Enabled: false
+
 Capybara/SpecificFinders:
   Description: 'Checks if there is a more specific finder offered by Capybara.'
   Enabled: false

+ 4 - 4
Gemfile.lock

@@ -374,7 +374,7 @@ GEM
       childprocess (>= 0.6.3, < 5)
       iniparse (~> 1.4)
       rexml (~> 3.2)
-    parallel (1.22.1)
+    parallel (1.23.0)
     parser (3.2.2.0)
       ast (~> 2.4.1)
     pg (1.2.3)
@@ -449,7 +449,7 @@ GEM
       ffi (~> 1.0)
     rchardet (1.8.0)
     redis (4.8.1)
-    regexp_parser (2.7.0)
+    regexp_parser (2.8.0)
     rexml (3.2.5)
     rspec-core (3.12.1)
       rspec-support (~> 3.12.0)
@@ -483,7 +483,7 @@ GEM
       unicode-display_width (>= 2.4.0, < 3.0)
     rubocop-ast (1.28.0)
       parser (>= 3.2.1.0)
-    rubocop-capybara (2.17.0)
+    rubocop-capybara (2.17.1)
       rubocop (~> 1.41)
     rubocop-faker (1.1.0)
       faker (>= 2.12.0)
@@ -501,7 +501,7 @@ GEM
       activesupport (>= 4.2.0)
       rack (>= 1.1)
       rubocop (>= 1.33.0, < 2.0)
-    rubocop-rspec (2.18.1)
+    rubocop-rspec (2.20.0)
       rubocop (~> 1.33)
       rubocop-capybara (~> 2.17)
     ruby-progressbar (1.13.0)

+ 1 - 1
spec/lib/background_services/service_config_spec.rb

@@ -41,7 +41,7 @@ RSpec.describe BackgroundServices::ServiceConfig do
     it 'returns configurations for all known services' do
       configurations = described_class.configuration_from_env({})
 
-      expect(configurations.map(&:service)).to match_array [BackgroundServices::Service::ProcessScheduledJobs, BackgroundServices::Service::ProcessDelayedJobs]
+      expect(configurations.map(&:service)).to contain_exactly(BackgroundServices::Service::ProcessScheduledJobs, BackgroundServices::Service::ProcessDelayedJobs)
     end
 
     it 'parses configuration for a service' do

+ 1 - 4
spec/lib/background_services_spec.rb

@@ -37,10 +37,7 @@ RSpec.describe BackgroundServices do
 
   describe '.available_services' do
     it 'matches existing classes' do
-      expect(described_class.available_services).to match_array [
-        BackgroundServices::Service::ProcessScheduledJobs,
-        BackgroundServices::Service::ProcessDelayedJobs
-      ]
+      expect(described_class.available_services).to contain_exactly(BackgroundServices::Service::ProcessScheduledJobs, BackgroundServices::Service::ProcessDelayedJobs)
     end
   end
 

+ 1 - 1
spec/lib/monitoring_helper/health_checker/data_privacy_task_spec.rb

@@ -19,7 +19,7 @@ RSpec.describe MonitoringHelper::HealthChecker::DataPrivacyTask do
     it 'finds incomplete tasks started before timeout' do
       task1 && task2 && task3
 
-      expect(instance.send(:scope)).to match_array [task2]
+      expect(instance.send(:scope)).to contain_exactly(task2)
     end
   end
 end

+ 1 - 1
spec/lib/monitoring_helper/health_checker/delayed_job_spec.rb

@@ -40,7 +40,7 @@ RSpec.describe MonitoringHelper::HealthChecker::DelayedJob do
       job2 = Delayed::Job.enqueue(SampleJob.new)
       job2.update!(attempts: 5)
 
-      expect(instance.send(:scope)).to match_array([job2])
+      expect(instance.send(:scope)).to contain_exactly(job2)
     end
   end
 

+ 1 - 1
spec/lib/validations/object_manager/attribute_validator/future_past_spec.rb

@@ -18,7 +18,7 @@ RSpec.describe Validations::ObjectManager::AttributeValidator::FuturePast do
   it_behaves_like 'validate backend'
 
   shared_examples 'data_option validator' do |data_option:, value:|
-    context "for data_option '#{data_option}'" do
+    context "with data_option '#{data_option}'" do
 
       let(:value) { value }
 

+ 1 - 1
spec/lib/validations/object_manager/attribute_validator/min_max_spec.rb

@@ -37,7 +37,7 @@ RSpec.describe Validations::ObjectManager::AttributeValidator::MinMax do
   context 'when validation should be performed' do
 
     shared_examples 'data_option validator' do |data_option:, data_option_value:, valid:, invalid:|
-      context "for data_option '#{data_option}'" do
+      context "with data_option '#{data_option}'" do
 
         before { attribute.data_option[data_option] = data_option_value }
 

+ 1 - 1
spec/lib/validations/object_manager/attribute_validator/required_spec.rb

@@ -27,7 +27,7 @@ RSpec.describe Validations::ObjectManager::AttributeValidator::Required do
 
       before { UserInfo.current_user_id = performing_user.id }
 
-      context "for applying permission (#{permission})" do
+      context "when applying permission (#{permission})" do
 
         let(:permission) { permission }
 

+ 1 - 0
spec/models/concerns/can_csv_import_organization_examples.rb

@@ -37,6 +37,7 @@ RSpec.shared_examples 'CanCsvImport - Organization specific tests', :aggregate_f
           expect { result }.not_to change(Organization, :count)
         end
       end
+
       context 'with :try' do
         include_examples 'checks error handling'
       end

Some files were not shown because too many files changed in this diff