aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/active_record_unit.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionview/test/active_record_unit.rb')
-rw-r--r--actionview/test/active_record_unit.rb12
1 files changed, 12 insertions, 0 deletions
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]