From b4b497318813f6e75b282901c8dc2e61c3e980cd Mon Sep 17 00:00:00 2001 From: Pia B Date: Fri, 7 Aug 2026 17:49:32 +0200 Subject: [PATCH] require httpx webmock early --- fasp_data_sharing/test/test_helper.rb | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/fasp_data_sharing/test/test_helper.rb b/fasp_data_sharing/test/test_helper.rb index 098c60e..85817fe 100644 --- a/fasp_data_sharing/test/test_helper.rb +++ b/fasp_data_sharing/test/test_helper.rb @@ -1,6 +1,13 @@ # Configure Rails Environment ENV["RAILS_ENV"] = "test" +require "webmock" +require "httpx/adapters/webmock" +require "webmock/minitest" +WebMock.disable_net_connect!( + allow_localhost: true +) + require_relative "../test/dummy/config/environment" ActiveRecord::Migrator.migrations_paths = [ File.expand_path("../test/dummy/db/migrate", __dir__) ] ActiveRecord::Migrator.migrations_paths << File.expand_path("../db/migrate", __dir__) @@ -14,11 +21,5 @@ ActiveSupport::TestCase.fixtures :all end -require "webmock" -require "httpx/adapters/webmock" -require "webmock/minitest" -WebMock.disable_net_connect!( - allow_localhost: true -) Dir[File.expand_path("support/**/*.rb", __dir__)].each { |f| require f }