-
Notifications
You must be signed in to change notification settings - Fork 937
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Specs: fix expect-style that wasn't backported to old should-style
- Loading branch information
Showing
1 changed file
with
12 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -197,11 +197,11 @@ def redefine_verify_none(new_value) | |
to "[email protected]" | ||
end | ||
|
||
expect(mail.smtp_envelope_from).to eq addr | ||
mail.smtp_envelope_from.should eq addr | ||
|
||
expect do | ||
doing { | ||
mail.deliver | ||
end.to raise_error(ArgumentError, "SMTP From address may not contain CR or LF line breaks: #{addr.inspect}") | ||
}.should raise_error(ArgumentError, "SMTP From address may not contain CR or LF line breaks: #{addr.inspect}") | ||
end | ||
|
||
it "should raise on SMTP injection via RCPT TO newlines" do | ||
|
@@ -212,11 +212,11 @@ def redefine_verify_none(new_value) | |
to addr | ||
end | ||
|
||
expect(mail.smtp_envelope_to).to eq [addr] | ||
mail.smtp_envelope_to.should eq [addr] | ||
|
||
expect do | ||
doing { | ||
mail.deliver | ||
end.to raise_error(ArgumentError, "SMTP To address may not contain CR or LF line breaks: #{addr.inspect}") | ||
}.should raise_error(ArgumentError, "SMTP To address may not contain CR or LF line breaks: #{addr.inspect}") | ||
end | ||
|
||
it "should raise on SMTP injection via MAIL FROM overflow" do | ||
|
@@ -227,11 +227,11 @@ def redefine_verify_none(new_value) | |
to "[email protected]" | ||
end | ||
|
||
expect(mail.smtp_envelope_from).to eq addr | ||
mail.smtp_envelope_from.should eq addr | ||
|
||
expect do | ||
doing { | ||
mail.deliver | ||
end.to raise_error(ArgumentError, "SMTP From address may not exceed 2kB: #{addr.inspect}") | ||
}.should raise_error(ArgumentError, "SMTP From address may not exceed 2kB: #{addr.inspect}") | ||
end | ||
|
||
it "should raise on SMTP injection via RCPT TO overflow" do | ||
|
@@ -242,11 +242,11 @@ def redefine_verify_none(new_value) | |
to addr | ||
end | ||
|
||
expect(mail.smtp_envelope_to).to eq [addr] | ||
mail.smtp_envelope_to.should eq [addr] | ||
|
||
expect do | ||
doing { | ||
mail.deliver | ||
end.to raise_error(ArgumentError, "SMTP To address may not exceed 2kB: #{addr.inspect}") | ||
}.should raise_error(ArgumentError, "SMTP To address may not exceed 2kB: #{addr.inspect}") | ||
end | ||
end | ||
end |