aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2009-11-09 23:28:36 -0600
committerJoshua Peek <josh@joshpeek.com>2009-11-09 23:28:36 -0600
commit11e798ae0f2f46498811282756c9d21df3d4b523 (patch)
tree460a4afcd2b25cede89f2e2c785244dbcc97656f /activesupport
parent23229d5ad4cf1c222d4d8c4561fbdff284f9bdee (diff)
downloadrails-11e798ae0f2f46498811282756c9d21df3d4b523.tar.gz
rails-11e798ae0f2f46498811282756c9d21df3d4b523.tar.bz2
rails-11e798ae0f2f46498811282756c9d21df3d4b523.zip
Avoid adding component lib/ to load path multiple times
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/test/abstract_unit.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/activesupport/test/abstract_unit.rb b/activesupport/test/abstract_unit.rb
index d640c9bc63..dda139372e 100644
--- a/activesupport/test/abstract_unit.rb
+++ b/activesupport/test/abstract_unit.rb
@@ -5,7 +5,8 @@ begin
rescue LoadError
end
-$:.unshift(File.dirname(__FILE__) + '/../lib')
+lib = File.expand_path("#{File.dirname(__FILE__)}/../lib")
+$:.unshift(lib) unless $:.include?('lib') || $:.include?(lib)
require 'test/unit'
require 'mocha'