diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 0bcdc8fb..3c36d8d7 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -33,7 +33,10 @@ FactoryBot.find_definitions -WebMock.disable_net_connect!(allow_localhost: true, allow: /^elasticsearch[-a-z0-9]*$/) +WebMock.disable_net_connect!( + allow_localhost: true, + allow: Rails.configuration.elasticsearch["host"], +) RSpec.configure do |config| # RSpec Rails can automatically mix in different behaviours to your tests