提交 4747a9a5 编写于 作者: J José Valim

Getting rid of some warnings in AM suite.

上级 47e5caa9
......@@ -53,7 +53,9 @@ def no_instance_variable(recipient)
subject "No Instance Variable"
from "tester@example.com"
render :inline => "Look, subject.nil? is <%= @subject.nil? %>!"
silence_warnings do
render :inline => "Look, subject.nil? is <%= @subject.nil? %>!"
end
end
def initialize_defaults(method_name)
......
......@@ -239,7 +239,7 @@ def nested_multipart(recipient)
from "test@example.com"
content_type "multipart/mixed"
part :content_type => "multipart/alternative", :content_disposition => "inline", :headers => { "foo" => "bar" } do |p|
part :content_type => "multipart/alternative", :content_disposition => "inline", "foo" => "bar" do |p|
p.part :content_type => "text/plain", :body => "test text\nline #2"
p.part :content_type => "text/html", :body => "<b>test</b> HTML<br/>\nline #2"
end
......@@ -264,7 +264,7 @@ def attachment_with_custom_header(recipient)
from "test@example.com"
content_type "multipart/related"
part :content_type => "text/html", :body => 'yo'
attachment :content_type => "image/jpeg", :filename => File.join(File.dirname(__FILE__), "fixtures", "attachments", "test.jpg"), :data => "i am not a real picture", :headers => { 'Content-ID' => '<test@test.com>' }
attachment :content_type => "image/jpeg", :filename => File.join(File.dirname(__FILE__), "fixtures", "attachments", "test.jpg"), :data => "i am not a real picture", 'Content-ID' => '<test@test.com>'
end
def unnamed_attachment(recipient)
......@@ -1251,6 +1251,6 @@ def test_should_still_raise_exception_with_expected_message_when_calling_an_unde
RespondToMailer.not_a_method
end
assert_match /undefined method.*not_a_method/, error.message
assert_match(/undefined method.*not_a_method/, error.message)
end
end
require 'abstract_unit'
class TMailMailTest < Test::Unit::TestCase
class MailTest < Test::Unit::TestCase
def test_body
m = Mail.new
expected = 'something_with_underscores'
......
......@@ -92,7 +92,7 @@ def test_assert_emails_too_few_sent
end
end
assert_match /2 .* but 1/, error.message
assert_match(/2 .* but 1/, error.message)
end
def test_assert_emails_too_many_sent
......@@ -103,7 +103,7 @@ def test_assert_emails_too_many_sent
end
end
assert_match /1 .* but 2/, error.message
assert_match(/1 .* but 2/, error.message)
end
def test_assert_no_emails_failure
......@@ -113,7 +113,7 @@ def test_assert_no_emails_failure
end
end
assert_match /0 .* but 1/, error.message
assert_match(/0 .* but 1/, error.message)
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册