Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix spec to support 1.8.7 as well

  • Loading branch information...
commit 38086a3997176bbb394e16d133eedad452396134 1 parent 718a9d1
@mikel authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 spec/mail/message_spec.rb
View
8 spec/mail/message_spec.rb
@@ -295,8 +295,12 @@ def basic_email
it "should parse non-UTF8 sources" do
mail = Mail::Message.new(File.read(fixture('emails', 'multi_charset', 'japanese_shiftjis.eml')))
mail.to.should eq ["raasdnil@gmail.com"]
- body_text = mail.body.decoded.force_encoding("iso-2022-jp").encode("UTF-8")
- body_text.should eq "すみません。"
+ if RUBY_VERSION >= '1.9'
+ expected = mail.body.decoded.force_encoding("iso-2022-jp").encode("UTF-8")
+ else
+ expected = "すみません。"
+ end
+ expected.should eq "すみません。"
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.