Merge commit 'mikel/master'

This commit is contained in:
Jeremy Kemper 2009-12-30 00:18:41 -08:00
commit 97204fc0bc
3 changed files with 26 additions and 0 deletions

@ -45,3 +45,5 @@ module Text
autoload :Format, 'action_mailer/vendor/text_format'
end
require 'action_mailer/tmail_compat'

@ -0,0 +1,10 @@
module Mail
class Message
def set_content_type(*args)
STDERR.puts("Message#set_content_type is deprecated, please just call Message#content_type with the same arguments.\n#{caller}")
content_type(*args)
end
end
end

@ -0,0 +1,14 @@
require 'abstract_unit'
class TmailCompatTest < Test::Unit::TestCase
def test_set_content_type_raises_deprecation_warning
mail = Mail.new
STDERR.expects(:puts) # Deprecation warning
assert_nothing_raised do
mail.set_content_type "text/plain"
end
assert_equal mail.content_type.string, "text/plain"
end
end