Permalink
Browse files

Fix up spec warnings

  • Loading branch information...
1 parent e8eba64 commit 27bfb837d376a7ef6725d76dfb87dab039ee9be6 @mikel committed Nov 18, 2012
View
8 spec/mail/example_emails_spec.rb
@@ -251,10 +251,10 @@
it "should handle folding subject" do
mail = Mail.read(fixture('emails', 'rfc2822', 'example14.eml'))
- mail.from.should == ["atsushi@example.com"]
- mail.subject.should == "Re: TEST テストテスト"
- mail.message_id.should == '0CC5E11ED2C1D@example.com'
- mail.body.should == "Hello"
+ mail.from.should eq ["atsushi@example.com"]
+ mail.subject.should eq "Re: TEST テストテスト"
+ mail.message_id.should eq '0CC5E11ED2C1D@example.com'
+ mail.body.should eq "Hello"
end
end
View
22 spec/mail/fields/common/common_address_spec.rb
@@ -2,14 +2,14 @@
require 'spec_helper'
describe "Mail::CommonAddress" do
-
+
describe "address handling" do
-
+
it "should give the addresses it is going to" do
field = Mail::ToField.new("To: test1@lindsaar.net")
field.addresses.first.should eq "test1@lindsaar.net"
end
-
+
it "should split up the address list into individual addresses" do
field = Mail::ToField.new("To: test1@lindsaar.net, test2@lindsaar.net")
field.addresses.should eq ["test1@lindsaar.net", "test2@lindsaar.net"]
@@ -80,7 +80,6 @@
end
it "should keep the given value" do
- value = 'みける <mikel@test.lindsaar.net>'
field = Mail::ToField.new("")
field.value = given_value
field.value.should eq given_value
@@ -117,7 +116,6 @@
context "initialized with an empty string" do
it "should allow you to append an unquoted, multi-byte address value" do
- value = 'みける <mikel@test.lindsaar.net>'
expected_result = "To: =?UTF-8?B?44G/44GR44KL?= <mikel@test.lindsaar.net>\r\n"
field = Mail::ToField.new("")
field << given_value
@@ -211,19 +209,19 @@
end
end
-
+
describe "encoding and decoding fields" do
-
+
it "should allow us to encode an address field" do
field = Mail::ToField.new("test1@lindsaar.net, My Group: test2@lindsaar.net, me@lindsaar.net;")
field.encoded.should eq "To: test1@lindsaar.net, \r\n\sMy Group: test2@lindsaar.net, \r\n\sme@lindsaar.net;\r\n"
end
-
+
it "should allow us to encode a simple address field" do
field = Mail::ToField.new("test1@lindsaar.net")
field.encoded.should eq "To: test1@lindsaar.net\r\n"
end
-
+
it "should allow us to encode an address field" do
field = Mail::CcField.new("test1@lindsaar.net, My Group: test2@lindsaar.net, me@lindsaar.net;")
field.encoded.should eq "Cc: test1@lindsaar.net, \r\n\sMy Group: test2@lindsaar.net, \r\n\sme@lindsaar.net;\r\n"
@@ -233,19 +231,19 @@
field = Mail::ToField.new("test1@lindsaar.net, My Group: test2@lindsaar.net, me@lindsaar.net;")
field.decoded.should eq "test1@lindsaar.net, My Group: test2@lindsaar.net, me@lindsaar.net;"
end
-
+
it "should allow us to decode a non ascii address field" do
field = Mail::ToField.new("=?UTF-8?B?44G/44GR44KL?= <raasdnil@text.lindsaar.net>")
field.decoded.should eq '"みける" <raasdnil@text.lindsaar.net>'
end
-
+
it "should allow us to decode a non ascii address field" do
field = Mail::ToField.new("=?UTF-8?B?44G/44GR44KL?= <raasdnil@text.lindsaar.net>, =?UTF-8?B?44G/44GR44KL?= <mikel@text.lindsaar.net>")
field.decoded.should eq '"みける" <raasdnil@text.lindsaar.net>, "みける" <mikel@text.lindsaar.net>'
end
end
-
+
it "should yield each address object in turn" do
field = Mail::ToField.new("test1@lindsaar.net, test2@lindsaar.net, me@lindsaar.net")
addresses = []
View
8 spec/mail/mime_messages_spec.rb
@@ -102,10 +102,10 @@
it "should only split on exact boundary matches" do
mail = Mail.read(fixture('emails', 'mime_emails', 'email_with_similar_boundaries.eml'))
- mail.parts.size.should == 2
- mail.parts.first.parts.size.should == 2
- mail.boundary.should == "----=_NextPart_476c4fde88e507bb8028170e8cf47c73"
- mail.parts.first.boundary.should == "----=_NextPart_476c4fde88e507bb8028170e8cf47c73_alt"
+ mail.parts.size.should eq 2
+ mail.parts.first.parts.size.should eq 2
+ mail.boundary.should eq "----=_NextPart_476c4fde88e507bb8028170e8cf47c73"
+ mail.parts.first.boundary.should eq "----=_NextPart_476c4fde88e507bb8028170e8cf47c73_alt"
end
end

0 comments on commit 27bfb83

Please sign in to comment.