Disable paperclip processing in specs (#25359)

This commit is contained in:
Matt Jankowski
2023-06-10 12:27:35 -04:00
committed by GitHub
parent c81f59583c
commit c94bb9ba9a
4 changed files with 9 additions and 3 deletions

View File

@@ -94,6 +94,12 @@ RSpec.configure do |config|
stub_jsonld_contexts!
end
config.before(:each) do |example|
unless example.metadata[:paperclip_processing]
allow_any_instance_of(Paperclip::Attachment).to receive(:post_process).and_return(true) # rubocop:disable RSpec/AnyInstance
end
end
config.after :each do
Rails.cache.clear
redis.del(redis.keys)