From 9f512847216cb1ca5a069957760443956b30f464 Mon Sep 17 00:00:00 2001 From: Max Kadel Date: Tue, 28 Sep 2021 16:19:49 -0400 Subject: [PATCH] Test suite configuration fixes --- spec/dummy/spec/system/import_file_status_spec.rb | 6 ++++++ spec/rails_helper.rb | 1 + 2 files changed, 7 insertions(+) diff --git a/spec/dummy/spec/system/import_file_status_spec.rb b/spec/dummy/spec/system/import_file_status_spec.rb index c8b0caa..dc731bf 100644 --- a/spec/dummy/spec/system/import_file_status_spec.rb +++ b/spec/dummy/spec/system/import_file_status_spec.rb @@ -7,7 +7,13 @@ before do allow(CharacterizeJob).to receive(:perform_later) + end + + around do |example| + orig_import_path = ENV['IMPORT_PATH'] ENV['IMPORT_PATH'] = File.join(fixture_path, 'images') + example.run + ENV['IMPORT_PATH'] = orig_import_path end let(:csv_file) { File.join(fixture_path, 'csv_import', 'good', 'all_fields_multi.csv') } diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 8cb5b11..0cddad5 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -52,6 +52,7 @@ config.before(:suite) do FactoryBot.find_definitions ActiveFedora::Cleaner.clean! + ActiveJob::Base.queue_adapter = :test end config.before perform_jobs: true do