diff options
Diffstat (limited to 'actionmailer/test')
-rw-r--r-- | actionmailer/test/base_test.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index b7af86b622..9e1a4c22c6 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -167,7 +167,9 @@ class BaseTest < ActiveSupport::TestCase email = BaseMailer.attachment_with_hash assert_equal(1, email.attachments.length) assert_equal('invoice.jpg', email.attachments[0].filename) - assert_equal("\312\213\254\232)b", email.attachments['invoice.jpg'].decoded) + expected = "\312\213\254\232)b" + expected.force_encoding(Encoding::BINARY) if '1.9'.respond_to?(:force_encoding) + assert_equal expected, email.attachments['invoice.jpg'].decoded end test "sets mime type to multipart/mixed when attachment is included" do @@ -483,4 +485,4 @@ class BaseTest < ActiveSupport::TestCase hash[key] = value end end -end
\ No newline at end of file +end |