diff options
author | José Valim and Mikel Lindsaar <pair@programming.com> | 2010-01-25 13:39:48 +1100 |
---|---|---|
committer | José Valim and Mikel Lindsaar <pair@programming.com> | 2010-01-25 13:39:48 +1100 |
commit | e4a989e9d99b9860859ad14b5a6fca62a4009cf9 (patch) | |
tree | 3c1f8c125517c17d5709f3c7545199e2e59cd941 /actionmailer/test/base_test.rb | |
parent | e1c131863897390d04bd5515765236590747f2c1 (diff) | |
download | rails-e4a989e9d99b9860859ad14b5a6fca62a4009cf9.tar.gz rails-e4a989e9d99b9860859ad14b5a6fca62a4009cf9.tar.bz2 rails-e4a989e9d99b9860859ad14b5a6fca62a4009cf9.zip |
Added delivery_handler method to mail and implemented in ActionMailer to deliver inside of instrumentation
Diffstat (limited to 'actionmailer/test/base_test.rb')
-rw-r--r-- | actionmailer/test/base_test.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index d8616ee3be..81e1df3911 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -354,7 +354,12 @@ class BaseTest < ActiveSupport::TestCase test "calling deliver on the action should deliver the mail object" do BaseMailer.deliveries.clear - BaseMailer.expects(:delivered_email).once + BaseMailer.expects(:deliver_mail).once + BaseMailer.welcome.deliver + end + + test "calling deliver on the action should increment the deliveries collection" do + BaseMailer.deliveries.clear BaseMailer.welcome.deliver assert_equal(1, BaseMailer.deliveries.length) end |