diff --git a/spec/jobs/cron/weekly_overview_job_spec.rb b/spec/jobs/cron/weekly_overview_job_spec.rb index e6fd7e254..9e1041e5a 100644 --- a/spec/jobs/cron/weekly_overview_job_spec.rb +++ b/spec/jobs/cron/weekly_overview_job_spec.rb @@ -32,7 +32,7 @@ RSpec.describe Cron::WeeklyOverviewJob, type: :job do end it { expect(InstructeurMailer).to have_received(:last_week_overview).with(instructeur) } - it { expect { run_job }.not_to raise_error(NoMethodError) } + it { expect { run_job }.not_to raise_error } end end diff --git a/spec/jobs/export_job_spec.rb b/spec/jobs/export_job_spec.rb index a6e26c6a7..81893d4c4 100644 --- a/spec/jobs/export_job_spec.rb +++ b/spec/jobs/export_job_spec.rb @@ -23,7 +23,7 @@ describe ExportJob do let(:format) { :zip } it 'does not try to identify file' do - expect { subject }.not_to raise_error(ActiveStorage::FileNotFoundError) + expect { subject }.not_to raise_error end end end diff --git a/spec/lib/recovery/align_champ_with_dossier_revision_spec.rb b/spec/lib/recovery/align_champ_with_dossier_revision_spec.rb index 6a10aabf5..67f966787 100644 --- a/spec/lib/recovery/align_champ_with_dossier_revision_spec.rb +++ b/spec/lib/recovery/align_champ_with_dossier_revision_spec.rb @@ -33,7 +33,7 @@ describe Recovery::AlignChampWithDossierRevision do expect(fixer.logs.size).to eq(1) expect(fixer.logs.first.fetch(:status)).to eq(:updated) - expect { DossierPreloader.load_one(bad_dossier) }.not_to raise_error(ArgumentError) + expect { DossierPreloader.load_one(bad_dossier) }.not_to raise_error expect(bad_dossier.champs.size).to eq(2) expect(bad_dossier.champs_public.size).to eq(2) end @@ -60,7 +60,7 @@ describe Recovery::AlignChampWithDossierRevision do expect(fixer.logs.size).to eq(1) expect(fixer.logs.first.fetch(:status)).to eq(:not_found) - expect { DossierPreloader.load_one(bad_dossier) }.not_to raise_error(ArgumentError) + expect { DossierPreloader.load_one(bad_dossier) }.not_to raise_error expect(bad_dossier.champs.size).to eq(1) expect(bad_dossier.champs_public.size).to eq(1) end diff --git a/spec/lib/recovery/revision_life_cycle_spec.rb b/spec/lib/recovery/revision_life_cycle_spec.rb index 4ea60b5b4..eb4c5e966 100644 --- a/spec/lib/recovery/revision_life_cycle_spec.rb +++ b/spec/lib/recovery/revision_life_cycle_spec.rb @@ -30,7 +30,7 @@ describe 'Recovery::Revision::LifeCycle' do expect(dossier.champs_public.size).to eq(1) expect(dossier.champs.size).to eq(2) importer.load - expect { DossierPreloader.load_one(dossier) }.not_to raise_error(ArgumentError) + expect { DossierPreloader.load_one(dossier) }.not_to raise_error expect(dossier.champs_public.size).to eq(2) end end diff --git a/spec/models/concern/dossier_clone_concern_spec.rb b/spec/models/concern/dossier_clone_concern_spec.rb index 8bd9cbfd4..b7922de61 100644 --- a/spec/models/concern/dossier_clone_concern_spec.rb +++ b/spec/models/concern/dossier_clone_concern_spec.rb @@ -385,7 +385,7 @@ RSpec.describe DossierCloneConcern do procedure.publish_revision! end it 'works' do - expect { subject }.not_to raise_error(ActiveRecord::InvalidForeignKey) + expect { subject }.not_to raise_error end end end diff --git a/spec/services/procedure_export_service_spec.rb b/spec/services/procedure_export_service_spec.rb index 1d3f7c6e9..0cdc536ff 100644 --- a/spec/services/procedure_export_service_spec.rb +++ b/spec/services/procedure_export_service_spec.rb @@ -489,7 +489,7 @@ describe ProcedureExportService do subject { service.to_zip } context 'without files' do it 'does not raises in_batches' do - expect { subject }.not_to raise_error(NoMethodError) + expect { subject }.not_to raise_error end it 'returns an empty blob' do