From 4f96e739c215331562c09cd215536c35a85508fd Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 24 Sep 2018 14:49:26 -0700 Subject: Remove deprecated catch-all route in the AV tests This commit removes a deprecated catch-all route in the AV tests. It defines and includes the necessary routes for each test such that we don't need the catch-all anymore. This also helps push us toward #33970 --- actionview/test/active_record_unit.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'actionview/test/active_record_unit.rb') diff --git a/actionview/test/active_record_unit.rb b/actionview/test/active_record_unit.rb index 7f48b515a0..e4ea6a426d 100644 --- a/actionview/test/active_record_unit.rb +++ b/actionview/test/active_record_unit.rb @@ -74,6 +74,18 @@ end class ActiveRecordTestCase < ActionController::TestCase include ActiveRecord::TestFixtures + def self.tests(controller) + super + if defined? controller::ROUTES + include Module.new { + define_method(:setup) do + super() + @routes = controller::ROUTES + end + } + end + end + # Set our fixture path if ActiveRecordTestConnector.able_to_connect self.fixture_path = [FIXTURE_LOAD_PATH] -- cgit v1.2.3