From 060e61da9a92eab2891f61882b3f76dae40b70ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Thu, 9 Sep 2010 16:03:45 +0200 Subject: [PATCH] test suite: don't use Rails 3, avoid deprecation warning with 2.3.9 --- test/boot.rb | 4 ++-- test/lib/activerecord_test_connector.rb | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/test/boot.rb b/test/boot.rb index 622fc93c4..5344b0794 100644 --- a/test/boot.rb +++ b/test/boot.rb @@ -15,7 +15,7 @@ if version gem 'rails', version else - gem 'actionpack' - gem 'activerecord' + gem 'actionpack', '< 3.0.0.a' + gem 'activerecord', '< 3.0.0.a' end end diff --git a/test/lib/activerecord_test_connector.rb b/test/lib/activerecord_test_connector.rb index 1130cf5f5..d3e80e6e3 100644 --- a/test/lib/activerecord_test_connector.rb +++ b/test/lib/activerecord_test_connector.rb @@ -28,7 +28,8 @@ def self.setup def self.add_load_path(path) dep = defined?(ActiveSupport::Dependencies) ? ActiveSupport::Dependencies : ::Dependencies - dep.load_paths.unshift path + autoload_paths = dep.respond_to?(:autoload_paths) ? dep.autoload_paths : dep.load_paths + autoload_paths.unshift path end def self.setup_connection