Configure Capybara sessions to reset after each example
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user