diff options
author | Rémy Coutable <remy@rymai.me> | 2017-06-16 18:23:49 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-06-16 18:23:49 +0300 |
commit | abc5d1d0a52619b56e931007cf7c136732aae198 (patch) | |
tree | efd234040d7b0f11ba3e8c14e2d2ef5dde756f1f /spec/support/wait_for_requests.rb | |
parent | 5f42009f8dcc29d559ee415e92c88858e361f063 (diff) |
Call Capybara.reset_sessions! before block_and_wait_for_requests_complete
capybara/rspec already calls Capybara.reset_sessions! in an
`after` hook, but `block_and_wait_for_requests_complete` is called
before it so by calling it explicitely here, we prevent any new
requests from being fired.
See
https://github.com/teamcapybara/capybara/blob/ffb41cfad620de1961bb49b1562a9fa9b28c0903/lib/capybara/rspec.rb#L20-L25
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/support/wait_for_requests.rb')
-rw-r--r-- | spec/support/wait_for_requests.rb | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/spec/support/wait_for_requests.rb b/spec/support/wait_for_requests.rb index 1cbe609c0e0..b5c3c0f55b8 100644 --- a/spec/support/wait_for_requests.rb +++ b/spec/support/wait_for_requests.rb @@ -53,9 +53,3 @@ module WaitForRequests Capybara.current_driver == Capybara.javascript_driver end end - -RSpec.configure do |config| - config.after(:each, :js) do - block_and_wait_for_requests_complete - end -end |