aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/test/mail_service_test.rb
diff options
context:
space:
mode:
authorJoel Chippindale <joel.chippindale@gmail.com>2008-11-11 09:45:53 -0600
committerJoshua Peek <josh@joshpeek.com>2008-11-11 09:46:29 -0600
commitc65075feb6c4ce15582bc08411e6698d782249a7 (patch)
tree24f4f15871daeb3cf4582c168a01c844f86d2b73 /actionmailer/test/mail_service_test.rb
parenta62e9e90d8f47a643c9355f782ab4891fa8fefaa (diff)
downloadrails-c65075feb6c4ce15582bc08411e6698d782249a7.tar.gz
rails-c65075feb6c4ce15582bc08411e6698d782249a7.tar.bz2
rails-c65075feb6c4ce15582bc08411e6698d782249a7.zip
Fixed method_missing for ActionMailer so it no longer matches methods where deliver or create are not a suffix [#1318 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
Diffstat (limited to 'actionmailer/test/mail_service_test.rb')
-rw-r--r--actionmailer/test/mail_service_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/actionmailer/test/mail_service_test.rb b/actionmailer/test/mail_service_test.rb
index 8b1c9a8dca..b88beb3314 100644
--- a/actionmailer/test/mail_service_test.rb
+++ b/actionmailer/test/mail_service_test.rb
@@ -1046,6 +1046,10 @@ class RespondToTest < Test::Unit::TestCase
assert !RespondToMailer.respond_to?(:deliver_1_template)
end
+ def test_should_not_respond_to_method_where_deliver_is_not_a_suffix
+ assert !RespondToMailer.respond_to?(:foo_deliver_template)
+ end
+
def test_should_still_raise_exception_with_expected_message_when_calling_an_undefined_method
error = assert_raises NoMethodError do
RespondToMailer.not_a_method