diff --git a/test/pages_test.rb b/test/pages_test.rb index cefbc373..cbd5266d 100644 --- a/test/pages_test.rb +++ b/test/pages_test.rb @@ -7,7 +7,7 @@ class PagesTest < ActionDispatch::IntegrationTest visit root_path # ^ will raise on JS errors - assert_equal page.status_code, 200 + assert_equal 200, page.status_code screenshot! end diff --git a/test/support/integration_test.rb b/test/support/integration_test.rb index afd10b82..54fb49e1 100644 --- a/test/support/integration_test.rb +++ b/test/support/integration_test.rb @@ -2,7 +2,13 @@ require 'capybara' module IntegrationTest include Capybara::DSL + def setup + super + %x[rm -rf test/dummy/tmp/cache] + end + def teardown + super Capybara.reset_sessions! Capybara.use_default_driver end