aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authoreileencodes <eileencodes@gmail.com>2017-02-19 11:50:42 -0500
committereileencodes <eileencodes@gmail.com>2017-02-20 15:07:35 -0500
commit1a0ca84a064b07ecab798793a3d7ebe89bb6367c (patch)
treeb4eccc275e62040d0a3ffdcc19103e54ab0289b6 /railties/lib
parent0a683085b1db435b7371350b2799a0f248cd717a (diff)
downloadrails-1a0ca84a064b07ecab798793a3d7ebe89bb6367c.tar.gz
rails-1a0ca84a064b07ecab798793a3d7ebe89bb6367c.tar.bz2
rails-1a0ca84a064b07ecab798793a3d7ebe89bb6367c.zip
Move and rename system tests
* Move system tests back into Action Pack * Rename `ActionSystemTest` to `ActionDispatch::SystemTestCase` * Remove private base module and only make file for public `SystemTestCase` class, name private module `SystemTesting` * Rename `ActionSystemTestCase` to `ApplicationSystemTestCase` * Update corresponding documentation and guides * Delete old `ActionSystemTest` files
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/rails/generators/rails/app/templates/test/system_test_helper.rb2
-rw-r--r--railties/lib/rails/generators/rails/plugin/templates/test/system_test_helper.rb2
-rw-r--r--railties/lib/rails/generators/test_unit/system/templates/system_test.rb8
-rw-r--r--railties/lib/rails/generators/test_unit/system/templates/system_test_helper.rb2
-rw-r--r--railties/lib/rails/test_help.rb4
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