aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators
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/rails/generators
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/rails/generators')
-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
4 files changed, 8 insertions, 6 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!