Configure Capybara sessions to reset after each example

This commit is contained in:
Angel Perez
2018-03-21 16:08:45 -04:00
parent 92af93e8bd
commit 0a6ee897a7
2 changed files with 4 additions and 2 deletions

View File

@@ -151,8 +151,6 @@ feature "Home" do
visit root_path
expect(page).not_to have_xpath(ie_alert_box_xpath, visible: false)
expect(page.driver.request.cookies['ie_alert_closed']).to eq('true')
Capybara.current_session.driver.header('', '')
end
scenario 'non-IE visitors are not bothered with IE alerts' do

View File

@@ -57,6 +57,10 @@ RSpec.configure do |config|
end
end
config.before(:each, type: :feature) do
Capybara.reset_sessions!
end
config.before do
DatabaseCleaner.start
end