aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2010-02-15 10:20:11 -0600
committerJoshua Peek <josh@joshpeek.com>2010-02-15 10:20:11 -0600
commiteec2d301d4ce9df9c71c1a5aa63053eb970b6818 (patch)
tree760bf54f7802d3e4f76e2db5bc642bb52637b532 /activerecord/test
parent7cff54f5d3ae2e364f0d147ceb86ea701b21389c (diff)
downloadrails-eec2d301d4ce9df9c71c1a5aa63053eb970b6818.tar.gz
rails-eec2d301d4ce9df9c71c1a5aa63053eb970b6818.tar.bz2
rails-eec2d301d4ce9df9c71c1a5aa63053eb970b6818.zip
Fix test load paths for those not using bundler
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/helper.rb5
-rw-r--r--activerecord/test/cases/subscriber_test.rb5
2 files changed, 8 insertions, 2 deletions
diff --git a/activerecord/test/cases/helper.rb b/activerecord/test/cases/helper.rb
index 9e8bfbbee8..3254e7d800 100644
--- a/activerecord/test/cases/helper.rb
+++ b/activerecord/test/cases/helper.rb
@@ -1,4 +1,7 @@
-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)
require 'config'
diff --git a/activerecord/test/cases/subscriber_test.rb b/activerecord/test/cases/subscriber_test.rb
index 5328d4468b..3d7a8f5bab 100644
--- a/activerecord/test/cases/subscriber_test.rb
+++ b/activerecord/test/cases/subscriber_test.rb
@@ -1,3 +1,6 @@
+railties_path = File.expand_path('../../../../railties/lib', __FILE__)
+$:.unshift(railties_path) if File.directory?(railties_path) && !$:.include?(railties_path)
+
require "cases/helper"
require "models/developer"
require "rails/subscriber/test_helper"
@@ -39,4 +42,4 @@ class SubscriberTest < ActiveSupport::TestCase
assert_match /CACHE/, @logger.logged(:debug).last
assert_match /SELECT .*?FROM .?developers.?/, @logger.logged(:debug).last
end
-end \ No newline at end of file
+end