aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/test/cases/tests_database.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-02-17 00:48:04 +0100
committerJosé Valim <jose.valim@gmail.com>2010-02-17 00:48:04 +0100
commit3f948a0e2951a8bb7f32e98a404fb5ff97cb2896 (patch)
tree8528d926c137a3a0f18c21642a8b6be1f334b6df /activemodel/test/cases/tests_database.rb
parentd4e008fd0f9ebac3383a0c3ac093de68db9e2e66 (diff)
parent762088a0ef1f69ab09833732cfe8190098303ee6 (diff)
downloadrails-3f948a0e2951a8bb7f32e98a404fb5ff97cb2896.tar.gz
rails-3f948a0e2951a8bb7f32e98a404fb5ff97cb2896.tar.bz2
rails-3f948a0e2951a8bb7f32e98a404fb5ff97cb2896.zip
Merge master.
Diffstat (limited to 'activemodel/test/cases/tests_database.rb')
-rw-r--r--activemodel/test/cases/tests_database.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/activemodel/test/cases/tests_database.rb b/activemodel/test/cases/tests_database.rb
index 8ca54d2678..4a392f609f 100644
--- a/activemodel/test/cases/tests_database.rb
+++ b/activemodel/test/cases/tests_database.rb
@@ -1,6 +1,8 @@
require 'logger'
-$:.unshift(File.dirname(__FILE__) + '/../../../activerecord/lib')
+activerecord_path = File.expand_path('../../../../activerecord/lib', __FILE__)
+$:.unshift(activerecord_path) if File.directory?(activerecord_path) && !$:.include?(activerecord_path)
+
require 'active_record'
module ActiveModel