Commit 806ffd2c authored by Stan Hu's avatar Stan Hu

Don't include Capybara::DSL in the global scope

parent 619a7928
......@@ -32,7 +32,6 @@ end
Spinach.hooks.after_scenario do |scenario_data, step_definitions|
if scenario_data.tags.include?('javascript')
include Capybara::DSL
include WaitForRequests
block_and_wait_for_requests_complete
end
......
......@@ -3,6 +3,8 @@ require_relative './wait_for_requests'
module WaitForRequests
extend self
include Capybara::DSL
# This is inspired by http://www.salsify.com/blog/engineering/tearing-capybara-ajax-tests
def block_and_wait_for_requests_complete
Gitlab::Testing::RequestBlockerMiddleware.block_requests!
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment