diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-11-13 05:03:48 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-11-13 05:03:48 +0000 |
commit | c3ff04b05db1da913640481b79f75e51e804ed11 (patch) | |
tree | 5a9de9f2783b5186fab69eeaaeb44937f7a83ea8 /actionmailer/test | |
parent | f0753992ab8cc9bbbf9b047fdc56f8899df5635e (diff) | |
download | rails-c3ff04b05db1da913640481b79f75e51e804ed11.tar.gz rails-c3ff04b05db1da913640481b79f75e51e804ed11.tar.bz2 rails-c3ff04b05db1da913640481b79f75e51e804ed11.zip |
Allow mailer actions named send by using __send__ internally. Closes #6467.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5505 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionmailer/test')
-rwxr-xr-x | actionmailer/test/mail_service_test.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/actionmailer/test/mail_service_test.rb b/actionmailer/test/mail_service_test.rb index ccded61b7c..7b1ec68725 100755 --- a/actionmailer/test/mail_service_test.rb +++ b/actionmailer/test/mail_service_test.rb @@ -801,3 +801,25 @@ class InheritableTemplateRootTest < Test::Unit::TestCase assert_equal expected, FunkyPathMailer.template_root end end + +class MethodNamingTest < Test::Unit::TestCase + class TestMailer < ActionMailer::Base + def send + body 'foo' + end + end + + def setup + ActionMailer::Base.delivery_method = :test + ActionMailer::Base.perform_deliveries = true + ActionMailer::Base.deliveries = [] + end + + def test_send_method + assert_nothing_raised do + assert_emails 1 do + TestMailer.deliver_send + end + end + end +end |