diff options
Diffstat (limited to 'railties/lib/rails')
5 files changed, 10 insertions, 8 deletions
diff --git a/railties/lib/rails/generators/rails/app/templates/test/system_test_helper.rb b/railties/lib/rails/generators/rails/app/templates/test/system_test_helper.rb index 77c4738d6f..1d0ae787f7 100644 --- a/railties/lib/rails/generators/rails/app/templates/test/system_test_helper.rb +++ b/railties/lib/rails/generators/rails/app/templates/test/system_test_helper.rb @@ -1,6 +1,6 @@ require "test_helper" -class ActionSystemTestCase < ActionSystemTest::Base +class ApplicationSystemTestCase < ActionDispatch::SystemTestCase teardown do take_failed_screenshot Capybara.reset_sessions! diff --git a/railties/lib/rails/generators/rails/plugin/templates/test/system_test_helper.rb b/railties/lib/rails/generators/rails/plugin/templates/test/system_test_helper.rb index 77c4738d6f..1d0ae787f7 100644 --- a/railties/lib/rails/generators/rails/plugin/templates/test/system_test_helper.rb +++ b/railties/lib/rails/generators/rails/plugin/templates/test/system_test_helper.rb @@ -1,6 +1,6 @@ require "test_helper" -class ActionSystemTestCase < ActionSystemTest::Base +class ApplicationSystemTestCase < ActionDispatch::SystemTestCase teardown do take_failed_screenshot Capybara.reset_sessions! diff --git a/railties/lib/rails/generators/test_unit/system/templates/system_test.rb b/railties/lib/rails/generators/test_unit/system/templates/system_test.rb index bc3abd25d9..2afc7a4aac 100644 --- a/railties/lib/rails/generators/test_unit/system/templates/system_test.rb +++ b/railties/lib/rails/generators/test_unit/system/templates/system_test.rb @@ -1,7 +1,9 @@ require "system_test_helper" -class <%= class_name.pluralize %>Test < ActionSystemTestCase - # test 'the truth' do - # assert true +class <%= class_name.pluralize %>Test < ApplicationSystemTestCase + # test "visiting the index" do + # visit <%= plural_table_name %>_url + # + # assert_selector "h1", text: "<%= class_name %>" # end end diff --git a/railties/lib/rails/generators/test_unit/system/templates/system_test_helper.rb b/railties/lib/rails/generators/test_unit/system/templates/system_test_helper.rb index 77c4738d6f..1d0ae787f7 100644 --- a/railties/lib/rails/generators/test_unit/system/templates/system_test_helper.rb +++ b/railties/lib/rails/generators/test_unit/system/templates/system_test_helper.rb @@ -1,6 +1,6 @@ require "test_helper" -class ActionSystemTestCase < ActionSystemTest::Base +class ApplicationSystemTestCase < ActionDispatch::SystemTestCase teardown do take_failed_screenshot Capybara.reset_sessions! diff --git a/railties/lib/rails/test_help.rb b/railties/lib/rails/test_help.rb index 98bfddb197..75171f2395 100644 --- a/railties/lib/rails/test_help.rb +++ b/railties/lib/rails/test_help.rb @@ -7,7 +7,7 @@ require "active_support/test_case" require "action_controller" require "action_controller/test_case" require "action_dispatch/testing/integration" -require "action_system_test" +require "action_dispatch/system_test_case" require "rails/generators/test_case" require "active_support/testing/autorun" @@ -46,7 +46,7 @@ class ActionDispatch::IntegrationTest end end -class ActionSystemTest::Base +class ActionDispatch::SystemTestCase def before_setup # :nodoc: @routes = Rails.application.routes super |