mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Getting rid of some warnings in AM suite.
This commit is contained in:
parent
47e5caa96b
commit
4747a9a57e
4 changed files with 10 additions and 8 deletions
|
@ -53,7 +53,9 @@ class RenderMailer < ActionMailer::Base
|
|||
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 @@ class TestMailer < ActionMailer::Base
|
|||
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 @@ class TestMailer < ActionMailer::Base
|
|||
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 @@ class RespondToTest < Test::Unit::TestCase
|
|||
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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
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 @@ class TestHelperMailerTest < ActionMailer::TestCase
|
|||
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 @@ class TestHelperMailerTest < ActionMailer::TestCase
|
|||
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 @@ class TestHelperMailerTest < ActionMailer::TestCase
|
|||
end
|
||||
end
|
||||
|
||||
assert_match /0 .* but 1/, error.message
|
||||
assert_match(/0 .* but 1/, error.message)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue