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



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

def after_teardown
  take_failed_screenshot
  Capybara.reset_sessions!
  super
end

#before_setupObject



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

def before_setup
  host! DEFAULT_HOST
  super
end

#host!(host) ⇒ Object



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

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