diff options
author | Mikel Lindsaar <raasdnil@gmail.com> | 2009-12-17 12:00:32 +1100 |
---|---|---|
committer | Mikel Lindsaar <raasdnil@gmail.com> | 2009-12-17 12:00:32 +1100 |
commit | 418639b4cfe477d7309fa53e8b8e2472b44bda80 (patch) | |
tree | 1ffcf8e58a2d8c53311f90970c566f258d18cdd0 /actionmailer | |
parent | 186cd7bc530f705b889c27f3680ab48c7c10a6f3 (diff) | |
download | rails-418639b4cfe477d7309fa53e8b8e2472b44bda80.tar.gz rails-418639b4cfe477d7309fa53e8b8e2472b44bda80.tar.bz2 rails-418639b4cfe477d7309fa53e8b8e2472b44bda80.zip |
Fixes for working with 1.9.1-head
Diffstat (limited to 'actionmailer')
-rw-r--r-- | actionmailer/lib/action_mailer.rb | 2 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/base.rb | 1 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/mail_helper.rb | 19 | ||||
-rw-r--r-- | actionmailer/test/mail_service_test.rb | 4 | ||||
-rw-r--r-- | actionmailer/test/url_test.rb | 8 |
5 files changed, 10 insertions, 24 deletions
diff --git a/actionmailer/lib/action_mailer.rb b/actionmailer/lib/action_mailer.rb index e7ad68e212..e8adbf0eff 100644 --- a/actionmailer/lib/action_mailer.rb +++ b/actionmailer/lib/action_mailer.rb @@ -54,5 +54,5 @@ module Net end -gem 'mail', '>= 1.3.0' +gem 'mail', '>= 1.3.2' require 'mail' diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 24064b3a74..ab00bbba3c 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -258,7 +258,6 @@ module ActionMailer #:nodoc: include AbstractController::Layouts include AbstractController::Helpers - helper ActionMailer::MailHelper if Object.const_defined?(:ActionController) include ActionController::UrlWriter diff --git a/actionmailer/lib/action_mailer/mail_helper.rb b/actionmailer/lib/action_mailer/mail_helper.rb deleted file mode 100644 index 9aa178cdef..0000000000 --- a/actionmailer/lib/action_mailer/mail_helper.rb +++ /dev/null @@ -1,19 +0,0 @@ -module ActionMailer - module MailHelper - # Uses Text::Format to take the text and format it, indented two spaces for - # each line, and wrapped at 72 columns. - def block_format(text) - formatted = text.split(/\n\r\n/).collect { |paragraph| - Text::Format.new( - :columns => 72, :first_indent => 2, :body_indent => 2, :text => paragraph - ).format - }.join("\n") - - # Make list points stand on their own line - formatted.gsub!(/[ ]*([*]+) ([^*]*)/) { |s| " #{$1} #{$2.strip}\n" } - formatted.gsub!(/[ ]*([#]+) ([^#]*)/) { |s| " #{$1} #{$2.strip}\n" } - - formatted - end - end -end
\ No newline at end of file diff --git a/actionmailer/test/mail_service_test.rb b/actionmailer/test/mail_service_test.rb index dd8307a834..122c20a308 100644 --- a/actionmailer/test/mail_service_test.rb +++ b/actionmailer/test/mail_service_test.rb @@ -534,7 +534,7 @@ class ActionMailerTest < Test::Unit::TestCase assert_not_nil mail mail, from, to = mail - assert_equal 'system@loudthinking.com', from.to_s + assert_equal 'system@loudthinking.com', from.decoded end def test_from_with_name_for_smtp @@ -545,7 +545,7 @@ class ActionMailerTest < Test::Unit::TestCase assert_not_nil mail mail, from, to = mail - assert_equal 'system@loudthinking.com', from.to_s + assert_equal 'system@loudthinking.com', from.addresses.first end def test_reply_to diff --git a/actionmailer/test/url_test.rb b/actionmailer/test/url_test.rb index 0e565b95e8..6334466a92 100644 --- a/actionmailer/test/url_test.rb +++ b/actionmailer/test/url_test.rb @@ -69,10 +69,16 @@ class ActionMailerUrlTest < Test::Unit::TestCase created = nil assert_nothing_raised { created = TestMailer.create_signed_up_with_url(@recipient) } assert_not_nil created + + expected.message_id = '<123@456>' + created.message_id = '<123@456>' assert_equal expected.encoded, created.encoded assert_nothing_raised { TestMailer.deliver_signed_up_with_url(@recipient) } assert_not_nil ActionMailer::Base.deliveries.first - assert_equal expected.encoded, ActionMailer::Base.deliveries.first.encoded + delivered = ActionMailer::Base.deliveries.first + + delivered.message_id = '<123@456>' + assert_equal expected.encoded, delivered.encoded end end |