aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/test
diff options
context:
space:
mode:
authorJoel Chippindale <joel.chippindale@gmail.com>2008-11-11 09:39:50 -0600
committerJoshua Peek <josh@joshpeek.com>2008-11-11 09:46:29 -0600
commita62e9e90d8f47a643c9355f782ab4891fa8fefaa (patch)
tree8ab500e23d5a940f4bc277bbdcb73a9006c55ed1 /actionmailer/test
parent78a18392e15c3de1c70b44e285d1742687624dd1 (diff)
downloadrails-a62e9e90d8f47a643c9355f782ab4891fa8fefaa.tar.gz
rails-a62e9e90d8f47a643c9355f782ab4891fa8fefaa.tar.bz2
rails-a62e9e90d8f47a643c9355f782ab4891fa8fefaa.zip
Fix for ActionMailer::Base.method_missing so that it raises NoMethodError when no method is found [#1330 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
Diffstat (limited to 'actionmailer/test')
-rw-r--r--actionmailer/test/mail_service_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/actionmailer/test/mail_service_test.rb b/actionmailer/test/mail_service_test.rb
index f5cb372b2a..8b1c9a8dca 100644
--- a/actionmailer/test/mail_service_test.rb
+++ b/actionmailer/test/mail_service_test.rb
@@ -1045,4 +1045,12 @@ class RespondToTest < Test::Unit::TestCase
def test_should_not_respond_to_deliver_with_template_suffix_if_it_begins_with_a_digit
assert !RespondToMailer.respond_to?(:deliver_1_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
+ end
+
+ assert_match /undefined method.*not_a_method/, error.message
+ end
end