Skip to content

Commit

Permalink
Update CHANGELOG for #508. Massage spec style to match the others.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy committed Feb 10, 2013
1 parent e9b0043 commit e10b7e7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.rdoc
Expand Up @@ -29,6 +29,7 @@ Bugs:
* The Received header may contain zero name/value pairs, qmail-style (jeremy)
* Fix that setting an attachment with a :mime_type and :encoding would override the :encoding (jeremy)
* Fix that declaring an html_part but no text_part would use multipart/alternative anyway (jeremy)
* Close pull request 508 - Don't add an extra CRLF to MIME parts; split MIME parts on correct CRLF boundaries (Aalanar)
* Close pull request 496 - Correctly handle quoted-printable line breaks (jeremy)
* Close pull request 493 - Repair misencoded quoted-printable line breaks (jeremy)
* Close pull request 487 - Extract comments from group email addresses (bpot)
Expand Down
20 changes: 6 additions & 14 deletions spec/mail/round_tripping_spec.rb
Expand Up @@ -37,23 +37,15 @@
cc "nobody@test.lindsaar.net"
bcc "bob@test.lindsaar.net"
date Time.local(2009, 11, 6)
add_file :filename => "foo.txt", :content => "I have \ntwo lines\n\n"
end
Mail.new(initial.encoded).encoded.should eq initial.encoded
end

describe "round trip with attachment" do

let(:contents) { "I have \ntwo lines\n\n" }
let(:parsed) { Mail.new(initial.encoded) }
let(:initial) do
mail = Mail.new('Subject: FooBar')
mail.add_file :filename => "foo.txt", :content => contents
mail
end

it {parsed.encoded.should == initial.encoded}
it {parsed.attachments.first.decoded.should == contents}

it "should round trip attachment newlines" do
body = "I have \ntwo lines\n\n"
initial = Mail.new
initial.add_file :filename => "foo.txt", :content => body
Mail.new(initial.encoded).attachments.first.decoded.should eq body
end

end

0 comments on commit e10b7e7

Please sign in to comment.