aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb
blob: 491559eedf626c3651ff790ace9683dc9eac072a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
module ActionDispatch
  module SystemTesting
    module TestHelpers
      module SetupAndTeardown # :nodoc:
        DEFAULT_HOST = "127.0.0.1"

        def before_setup
          host! DEFAULT_HOST
          super
        end

        def after_teardown
          super
          take_failed_screenshot
          Capybara.reset_sessions!
        end
      end
    end
  end
end