Module: ActionDispatch::SystemTesting::TestHelpers::SetupAndTeardown

Included in:
ActionDispatch::SystemTestCase
Defined in:
lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb

Overview

:nodoc:

Constant Summary collapse

DEFAULT_HOST =
"http://127.0.0.1"

Instance Method Summary collapse

Instance Method Details

#after_teardownObject



24
25
26
27
28
# File 'lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb', line 24

def after_teardown
  Capybara.reset_sessions!
ensure
  super
end

#before_setupObject



13
14
15
16
# File 'lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb', line 13

def before_setup
  host! DEFAULT_HOST
  super
end

#before_teardownObject



18
19
20
21
22
# File 'lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb', line 18

def before_teardown
  take_failed_screenshot
ensure
  super
end

#host!(host) ⇒ Object



9
10
11
# File 'lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb', line 9

def host!(host)
  Capybara.app_host = host
end