From 5ff822083dad8eb52b1a319b271681b5ecefc27d Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 10 Jul 2018 18:59:15 +0100 Subject: [PATCH] Block non-localhost requests for all tests Only blocking them for the system tests didn't actually work anyway as the setting is global so would apply to all tests after the first system test. --- test/application_system_test_case.rb | 2 -- test/test_helper.rb | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/application_system_test_case.rb b/test/application_system_test_case.rb index 5b66f580e..0f46ad3ec 100644 --- a/test/application_system_test_case.rb +++ b/test/application_system_test_case.rb @@ -1,8 +1,6 @@ require "test_helper" require "capybara/poltergeist" -WebMock.disable_net_connect!(:allow_localhost => true) - # Work around weird debian/ubuntu phantomjs # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=817277 # https://github.com/ariya/phantomjs/issues/14376 diff --git a/test/test_helper.rb b/test/test_helper.rb index 688cbc113..83cf909dd 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -6,6 +6,8 @@ require_relative "../config/environment" require "rails/test_help" require "webmock/minitest" +WebMock.disable_net_connect!(:allow_localhost => true) + module ActiveSupport class TestCase include FactoryBot::Syntax::Methods -- 2.43.2