diff options
author | Joshua Peek <josh@joshpeek.com> | 2010-02-15 10:20:11 -0600 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2010-02-15 10:20:11 -0600 |
commit | eec2d301d4ce9df9c71c1a5aa63053eb970b6818 (patch) | |
tree | 760bf54f7802d3e4f76e2db5bc642bb52637b532 /activemodel/test | |
parent | 7cff54f5d3ae2e364f0d147ceb86ea701b21389c (diff) | |
download | rails-eec2d301d4ce9df9c71c1a5aa63053eb970b6818.tar.gz rails-eec2d301d4ce9df9c71c1a5aa63053eb970b6818.tar.bz2 rails-eec2d301d4ce9df9c71c1a5aa63053eb970b6818.zip |
Fix test load paths for those not using bundler
Diffstat (limited to 'activemodel/test')
-rw-r--r-- | activemodel/test/cases/helper.rb | 7 | ||||
-rw-r--r-- | activemodel/test/cases/tests_database.rb | 4 |
2 files changed, 9 insertions, 2 deletions
diff --git a/activemodel/test/cases/helper.rb b/activemodel/test/cases/helper.rb index 8bcbe54651..8b1ab9e196 100644 --- a/activemodel/test/cases/helper.rb +++ b/activemodel/test/cases/helper.rb @@ -1,4 +1,9 @@ -require File.expand_path('../../../../load_paths', __FILE__) +require File.expand_path('../../../../bundler', __FILE__) + +lib = File.expand_path("#{File.dirname(__FILE__)}/../../lib") +$:.unshift(lib) unless $:.include?('lib') || $:.include?(lib) + +puts $LOAD_PATH.inspect require 'config' require 'active_model' 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 |