aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/helper.rb
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2009-12-16 11:56:51 -0600
committerJoshua Peek <josh@joshpeek.com>2009-12-16 11:56:51 -0600
commit7ee5843c3cedfe36a680d5b28aa31eef45296c50 (patch)
treed399cb71b2533ec353ebbb5cc19a0c0902da1987 /activerecord/test/cases/helper.rb
parent1ab35020c152575c84d4ca95842d55be307e1fee (diff)
downloadrails-7ee5843c3cedfe36a680d5b28aa31eef45296c50.tar.gz
rails-7ee5843c3cedfe36a680d5b28aa31eef45296c50.tar.bz2
rails-7ee5843c3cedfe36a680d5b28aa31eef45296c50.zip
Fully expand relative rails framework paths and make sure we aren't
adding any to the load path more than once.
Diffstat (limited to 'activerecord/test/cases/helper.rb')
-rw-r--r--activerecord/test/cases/helper.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/activerecord/test/cases/helper.rb b/activerecord/test/cases/helper.rb
index 25613da912..307320b964 100644
--- a/activerecord/test/cases/helper.rb
+++ b/activerecord/test/cases/helper.rb
@@ -1,11 +1,9 @@
-root = File.expand_path('../../../..', __FILE__)
begin
- require "#{root}/vendor/gems/environment"
+ require File.expand_path('../../../../vendor/gems/environment', __FILE__)
rescue LoadError
- $:.unshift("#{root}/activesupport/lib")
end
-lib = File.expand_path("#{File.dirname(__FILE__)}/../../lib")
+lib = File.expand_path('../../../lib', __FILE__)
$:.unshift(lib) unless $:.include?('lib') || $:.include?(lib)
require 'config'