diff --git a/spec/mail/message_spec.rb b/spec/mail/message_spec.rb index e2405cf58..54bc8827b 100644 --- a/spec/mail/message_spec.rb +++ b/spec/mail/message_spec.rb @@ -136,6 +136,14 @@ def create_mail_with_splat_args expect(Mail::Message.new(raw_email).part[0].header[:filename]).to be_nil end + it "should preserve body text" do + m = Mail.new + m.body = "Body text" + m.add_file(:filename => "attachment.data", :content => "a") + + expect(m.body.to_s).to eq("Body text") + end + it "should not raise a warning on having non US-ASCII characters in the header (should just handle it)" do expect { read_fixture('emails', 'plain_emails', 'raw_email_string_in_date_field.eml')