diff options
author | José Valim <jose.valim@gmail.com> | 2009-12-27 12:18:46 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2009-12-27 12:18:46 +0100 |
commit | 4747a9a57ef4af8cd5172c9da5198cd632adce83 (patch) | |
tree | f90f9e33cb52905fce26bdea0a7c2768e10cc82e /actionmailer | |
parent | 47e5caa96bffc04c8c0b287a975a609fb048e530 (diff) | |
download | rails-4747a9a57ef4af8cd5172c9da5198cd632adce83.tar.gz rails-4747a9a57ef4af8cd5172c9da5198cd632adce83.tar.bz2 rails-4747a9a57ef4af8cd5172c9da5198cd632adce83.zip |
Getting rid of some warnings in AM suite.
Diffstat (limited to 'actionmailer')
-rw-r--r-- | actionmailer/test/mail_render_test.rb | 4 | ||||
-rw-r--r-- | actionmailer/test/mail_service_test.rb | 6 | ||||
-rw-r--r-- | actionmailer/test/mail_test.rb (renamed from actionmailer/test/tmail_test.rb) | 2 | ||||
-rw-r--r-- | actionmailer/test/test_helper_test.rb | 6 |
4 files changed, 10 insertions, 8 deletions
diff --git a/actionmailer/test/mail_render_test.rb b/actionmailer/test/mail_render_test.rb index 406aa0a116..09ce5e4854 100644 --- a/actionmailer/test/mail_render_test.rb +++ b/actionmailer/test/mail_render_test.rb @@ -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) diff --git a/actionmailer/test/mail_service_test.rb b/actionmailer/test/mail_service_test.rb index 87761185f4..d6ed8594d3 100644 --- a/actionmailer/test/mail_service_test.rb +++ b/actionmailer/test/mail_service_test.rb @@ -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 diff --git a/actionmailer/test/tmail_test.rb b/actionmailer/test/mail_test.rb index bd0190e661..ea6f25d157 100644 --- a/actionmailer/test/tmail_test.rb +++ b/actionmailer/test/mail_test.rb @@ -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' diff --git a/actionmailer/test/test_helper_test.rb b/actionmailer/test/test_helper_test.rb index 8e4254411c..86d22da9bf 100644 --- a/actionmailer/test/test_helper_test.rb +++ b/actionmailer/test/test_helper_test.rb @@ -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 |