aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/test/abstract_unit.rb
diff options
context:
space:
mode:
authorwycats <wycats@gmail.com>2010-03-16 23:24:00 -0700
committerwycats <wycats@gmail.com>2010-03-16 23:24:00 -0700
commitcd9ffd11e13ef6e62eba2cbd5c3760ff04132820 (patch)
tree0fcc940424e1265f03d5df623f324cf7ca310dd3 /actionmailer/test/abstract_unit.rb
parentc7388124153e1b1f85965998e5d1c20eed670da8 (diff)
downloadrails-cd9ffd11e13ef6e62eba2cbd5c3760ff04132820.tar.gz
rails-cd9ffd11e13ef6e62eba2cbd5c3760ff04132820.tar.bz2
rails-cd9ffd11e13ef6e62eba2cbd5c3760ff04132820.zip
Eliminate warnings for AM on 1.8
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)