diff options
author | wycats <wycats@gmail.com> | 2010-03-16 23:24:00 -0700 |
---|---|---|
committer | wycats <wycats@gmail.com> | 2010-03-16 23:24:00 -0700 |
commit | cd9ffd11e13ef6e62eba2cbd5c3760ff04132820 (patch) | |
tree | 0fcc940424e1265f03d5df623f324cf7ca310dd3 /actionmailer | |
parent | c7388124153e1b1f85965998e5d1c20eed670da8 (diff) | |
download | rails-cd9ffd11e13ef6e62eba2cbd5c3760ff04132820.tar.gz rails-cd9ffd11e13ef6e62eba2cbd5c3760ff04132820.tar.bz2 rails-cd9ffd11e13ef6e62eba2cbd5c3760ff04132820.zip |
Eliminate warnings for AM on 1.8
Diffstat (limited to 'actionmailer')
-rw-r--r-- | actionmailer/lib/action_mailer/old_api.rb | 3 | ||||
-rw-r--r-- | actionmailer/test/abstract_unit.rb | 21 | ||||
-rw-r--r-- | actionmailer/test/old_base/url_test.rb | 2 |
3 files changed, 22 insertions, 4 deletions
diff --git a/actionmailer/lib/action_mailer/old_api.rb b/actionmailer/lib/action_mailer/old_api.rb index fb4b6701dd..4581b31bb9 100644 --- a/actionmailer/lib/action_mailer/old_api.rb +++ b/actionmailer/lib/action_mailer/old_api.rb @@ -31,9 +31,6 @@ module ActionMailer # replies to this message. adv_attr_accessor :reply_to - # Specify additional headers to be added to the message. - adv_attr_accessor :headers - # Specify the order in which parts should be sorted, based on content-type. # This defaults to the value for the +default_implicit_parts_order+. adv_attr_accessor :implicit_parts_order 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) diff --git a/actionmailer/test/old_base/url_test.rb b/actionmailer/test/old_base/url_test.rb index 60740d6b0b..c98c3cde3a 100644 --- a/actionmailer/test/old_base/url_test.rb +++ b/actionmailer/test/old_base/url_test.rb @@ -31,6 +31,8 @@ class TestMailer < ActionMailer::Base attr_accessor :received_body end + remove_method :receive + def receive(mail) self.class.received_body = mail.body end |