summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-01-09 21:53:58 -0800
committerStan Hu <stanhu@gmail.com>2018-01-09 23:14:59 -0800
commit87011a8a92417d6516701b6b32dcc4897dd173a1 (patch)
treeb98c34694f830b79e0d2bfef7992baf025222de1
parent3576d59ae95a61dd20e997a619dbc6c8e8a70276 (diff)
downloadgitlab-ce-sh-fix-webmock.tar.gz
Properly enable WebMock in Capybara testssh-fix-webmock
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.
-rw-r--r--features/support/env.rb3
1 files changed, 2 insertions, 1 deletions
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