Don't include Capybara::DSL in the global scope
This commit is contained in:
parent
619a792861
commit
806ffd2cec
2 changed files with 2 additions and 1 deletions
|
@ -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!
|
||||
|
|
Loading…
Reference in a new issue