From 87011a8a92417d6516701b6b32dcc4897dd173a1 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Tue, 9 Jan 2018 21:53:58 -0800 Subject: Properly enable WebMock in Capybara tests WebMock wasn't properly activated in EE, causing real requests to go out. This change is to mirror the changes in gitlab-org/gitlab-ee!3988. --- features/support/env.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/features/support/env.rb b/features/support/env.rb index 91a92314959..2602fbfe179 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -16,7 +16,8 @@ end Dir["#{Rails.root}/features/steps/shared/*.rb"].each { |file| require file } -WebMock.allow_net_connect! +WebMock.enable! +WebMock.disable_net_connect!(allow_localhost: true) Spinach.hooks.before_run do include RSpec::Mocks::ExampleMethods -- cgit v1.2.1