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 }