0
0
Fork 0

Fix NULL MX handling and tighten DNS resolving specs (#28607)

This commit is contained in:
Claire 2024-01-05 12:07:57 +01:00 committed by GitHub
parent 9699ea22d6
commit 6ad0fb5a77
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 1 deletions

View file

@ -128,6 +128,10 @@ RSpec.configure do |config|
self.use_transactional_tests = true
end
config.before do |example|
allow(Resolv::DNS).to receive(:open).and_raise('Real DNS queries are disabled, stub Resolv::DNS as needed') unless example.metadata[:type] == :system
end
config.before do |example|
unless example.metadata[:paperclip_processing]
allow_any_instance_of(Paperclip::Attachment).to receive(:post_process).and_return(true) # rubocop:disable RSpec/AnyInstance