Browse Source

Skip paperclip spoof detector unless opted into attachment processing specs (#31454)

dariusk-working/4_3_0
Matt Jankowski 2 years ago committed by GitHub
parent
commit
19849eb91d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      spec/rails_helper.rb

5
spec/rails_helper.rb

@ -147,7 +147,10 @@ RSpec.configure do |config|
config.before do |example|
unless example.metadata[:attachment_processing]
allow_any_instance_of(Paperclip::Attachment).to receive(:post_process).and_return(true) # rubocop:disable RSpec/AnyInstance
# rubocop:disable RSpec/AnyInstance
allow_any_instance_of(Paperclip::Attachment).to receive(:post_process).and_return(true)
allow_any_instance_of(Paperclip::MediaTypeSpoofDetector).to receive(:spoofed?).and_return(false)
# rubocop:enable RSpec/AnyInstance
end
end

Loading…
Cancel
Save