From 98a039dcd987fd3a8c2c0cbd527c71ac3ffaaf06 Mon Sep 17 00:00:00 2001 From: Abdelkader Boudih Date: Tue, 27 Oct 2015 00:41:27 +0000 Subject: Update test generators to use ActionDispatch::IntegrationTest In Rails 5.1 `ActionController::TestCase` will be moved out of Rails into it's own gem. Please use `ActionDispatch::IntegrationTest` going forward. This changes the generators to use `ActionDispatch::IntegrationTest` and the required URL setup (rather than symbols) for each of the controller actions. Updated fix to #22076. --- railties/test/generators/namespaced_generators_test.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'railties/test/generators/namespaced_generators_test.rb') diff --git a/railties/test/generators/namespaced_generators_test.rb b/railties/test/generators/namespaced_generators_test.rb index 918faae74b..d76759a7d1 100644 --- a/railties/test/generators/namespaced_generators_test.rb +++ b/railties/test/generators/namespaced_generators_test.rb @@ -218,7 +218,7 @@ class NamespacedScaffoldGeneratorTest < NamespacedGeneratorTestCase /class ProductLinesController < ApplicationController/ assert_file "test/controllers/test_app/product_lines_controller_test.rb", - /module TestApp\n class ProductLinesControllerTest < ActionController::TestCase/ + /module TestApp\n class ProductLinesControllerTest < ActionDispatch::IntegrationTest/ # Views %w(index edit new show _form).each do |view| @@ -285,7 +285,7 @@ class NamespacedScaffoldGeneratorTest < NamespacedGeneratorTestCase end assert_file "test/controllers/test_app/admin/roles_controller_test.rb", - /module TestApp\n class Admin::RolesControllerTest < ActionController::TestCase/ + /module TestApp\n class Admin::RolesControllerTest < ActionDispatch::IntegrationTest/ # Views %w(index edit new show _form).each do |view| @@ -352,7 +352,7 @@ class NamespacedScaffoldGeneratorTest < NamespacedGeneratorTestCase end assert_file "test/controllers/test_app/admin/user/special/roles_controller_test.rb", - /module TestApp\n class Admin::User::Special::RolesControllerTest < ActionController::TestCase/ + /module TestApp\n class Admin::User::Special::RolesControllerTest < ActionDispatch::IntegrationTest/ # Views %w(index edit new show _form).each do |view| @@ -418,6 +418,6 @@ class NamespacedScaffoldGeneratorTest < NamespacedGeneratorTestCase assert_match(%r(require_dependency "test_app/application_controller"), content) end assert_file "test/controllers/test_app/admin/roles_controller_test.rb", - /module TestApp\n class Admin::RolesControllerTest < ActionController::TestCase/ + /module TestApp\n class Admin::RolesControllerTest < ActionDispatch::IntegrationTest/ end end -- cgit v1.2.3