diff options
Diffstat (limited to 'activemodel')
-rwxr-xr-x | activemodel/Rakefile | 2 | ||||
-rw-r--r-- | activemodel/test/cases/helper.rb | 7 | ||||
-rw-r--r-- | activemodel/test/cases/tests_database.rb | 4 |
3 files changed, 10 insertions, 3 deletions
diff --git a/activemodel/Rakefile b/activemodel/Rakefile index 14c02f183f..556ea2ec0b 100755 --- a/activemodel/Rakefile +++ b/activemodel/Rakefile @@ -13,7 +13,7 @@ require 'rake/testtask' task :default => :test Rake::TestTask.new do |t| - t.libs << "#{dir}/test" + t.libs << "test" t.test_files = Dir.glob("#{dir}/test/cases/**/*_test.rb").sort t.warning = true end 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 |