aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/test
diff options
context:
space:
mode:
Diffstat (limited to 'actionmailer/test')
-rw-r--r--actionmailer/test/abstract_unit.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/actionmailer/test/abstract_unit.rb b/actionmailer/test/abstract_unit.rb
index 7843623996..fcbaa9e186 100644
--- a/actionmailer/test/abstract_unit.rb
+++ b/actionmailer/test/abstract_unit.rb
@@ -1,15 +1,15 @@
-bundled = "#{File.dirname(__FILE__)}/../vendor/gems/environment"
-if File.exist?("#{bundled}.rb")
- require bundled
-else
- $:.unshift "#{File.dirname(__FILE__)}/../../activesupport/lib"
- $:.unshift "#{File.dirname(__FILE__)}/../../actionpack/lib"
+root = File.expand_path('../../..', __FILE__)
+begin
+ require "#{root}/vendor/gems/environment"
+rescue LoadError
+ $:.unshift("#{root}/activesupport/lib")
+ $:.unshift("#{root}/actionpack/lib")
+ $:.unshift("#{root}/actionmailer/lib")
end
require 'rubygems'
require 'test/unit'
-$:.unshift "#{File.dirname(__FILE__)}/../lib"
require 'action_mailer'
require 'action_mailer/test_case'