aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/test/abstract_unit.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionmailer/test/abstract_unit.rb')
-rw-r--r--actionmailer/test/abstract_unit.rb21
1 files changed, 20 insertions, 1 deletions
diff --git a/actionmailer/test/abstract_unit.rb b/actionmailer/test/abstract_unit.rb
index 16fef3a9a4..ea15709b45 100644
--- a/actionmailer/test/abstract_unit.rb
+++ b/actionmailer/test/abstract_unit.rb
@@ -1,4 +1,23 @@
-require File.expand_path('../../../load_paths', __FILE__)
+# Pathname has a warning, so require it first while silencing
+# warnings to shut it up.
+#
+# Also, in 1.9, Bundler creates warnings due to overriding
+# Rubygems methods
+begin
+ old, $VERBOSE = $VERBOSE, nil
+ require 'pathname'
+ require File.expand_path('../../../load_paths', __FILE__)
+ensure
+ $VERBOSE = old
+end
+
+
+require 'active_support/core_ext/kernel/reporting'
+silence_warnings do
+ # These external dependencies have warnings :/
+ require 'text/format'
+ require 'mail'
+end
lib = File.expand_path("#{File.dirname(__FILE__)}/../lib")
$:.unshift(lib) unless $:.include?('lib') || $:.include?(lib)