Configure Capybara sessions to reset after each example
This commit is contained in:
@@ -151,8 +151,6 @@ feature "Home" do
|
|||||||
visit root_path
|
visit root_path
|
||||||
expect(page).not_to have_xpath(ie_alert_box_xpath, visible: false)
|
expect(page).not_to have_xpath(ie_alert_box_xpath, visible: false)
|
||||||
expect(page.driver.request.cookies['ie_alert_closed']).to eq('true')
|
expect(page.driver.request.cookies['ie_alert_closed']).to eq('true')
|
||||||
|
|
||||||
Capybara.current_session.driver.header('', '')
|
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario 'non-IE visitors are not bothered with IE alerts' do
|
scenario 'non-IE visitors are not bothered with IE alerts' do
|
||||||
|
|||||||
@@ -57,6 +57,10 @@ RSpec.configure do |config|
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
config.before(:each, type: :feature) do
|
||||||
|
Capybara.reset_sessions!
|
||||||
|
end
|
||||||
|
|
||||||
config.before do
|
config.before do
|
||||||
DatabaseCleaner.start
|
DatabaseCleaner.start
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user