test/test_attachments.rb in tmail-1.2.6 vs test/test_attachments.rb in tmail-1.2.7

- old
+ new

@@ -42,10 +42,12 @@ def test_decode_encoded_attachment_filename fixture = File.read(File.dirname(__FILE__) + "/fixtures/raw_email8") mail = TMail::Mail.parse(fixture) attachment = mail.attachments.last - assert_equal "01 Quien Te Dij\302\212at. Pitbull.mp3", attachment.original_filename unless RUBY_VERSION.match(/1.9/) + expected = "01 Quien Te Dij\212at. Pitbull.mp3" + expected.force_encoding(Encoding::ASCII_8BIT) if expected.respond_to?(:force_encoding) + assert_equal expected, attachment.original_filename end def test_attachment_with_quoted_filename fixture = File.read(File.dirname(__FILE__) + "/fixtures/raw_email_with_quoted_attachment_filename") mail = TMail::Mail.parse(fixture)