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

Included in:
ActionDispatch::SystemTestCase
Defined in:
actionpack/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



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

def after_teardown
  take_failed_screenshot
  Capybara.reset_sessions!
  super
end

#before_setupObject



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

def before_setup
  host! DEFAULT_HOST
  super
end

#host!(host) ⇒ Object



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

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