aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/test/i18n_with_controller_test.rb
diff options
context:
space:
mode:
authorRonak Jangir <ronakjangir47@gmail.com>2015-08-20 11:27:49 +0530
committerRonak Jangir <ronakjangir47@gmail.com>2015-08-20 11:27:49 +0530
commitc48257b0af1e4f1be13600008f77bafe770f8f87 (patch)
tree5eb509e1a8f8f9d53038952044d76585fda9f61a /actionmailer/test/i18n_with_controller_test.rb
parentc83b117d4b8b6e78ba503d2744b640cc71fd8e8f (diff)
downloadrails-c48257b0af1e4f1be13600008f77bafe770f8f87.tar.gz
rails-c48257b0af1e4f1be13600008f77bafe770f8f87.tar.bz2
rails-c48257b0af1e4f1be13600008f77bafe770f8f87.zip
Removed mocha from ActionMailer
Diffstat (limited to 'actionmailer/test/i18n_with_controller_test.rb')
-rw-r--r--actionmailer/test/i18n_with_controller_test.rb13
1 files changed, 8 insertions, 5 deletions
diff --git a/actionmailer/test/i18n_with_controller_test.rb b/actionmailer/test/i18n_with_controller_test.rb
index 5ffde06a80..04e00cf481 100644
--- a/actionmailer/test/i18n_with_controller_test.rb
+++ b/actionmailer/test/i18n_with_controller_test.rb
@@ -53,12 +53,15 @@ class ActionMailerI18nWithControllerTest < ActionDispatch::IntegrationTest
end
def test_send_mail
- Mail::SMTP.any_instance.expects(:deliver!)
- with_translation 'de', email_subject: '[Anmeldung] Willkommen' do
- ActiveSupport::Deprecation.silence do
- get '/test/send_mail'
+ stub_any_instance(Mail::SMTP, instance: Mail::SMTP.new({})) do |instance|
+ assert_called(instance, :deliver!) do
+ with_translation 'de', email_subject: '[Anmeldung] Willkommen' do
+ ActiveSupport::Deprecation.silence do
+ get '/test/send_mail'
+ end
+ assert_equal "Mail sent - Subject: [Anmeldung] Willkommen", @response.body
+ end
end
- assert_equal "Mail sent - Subject: [Anmeldung] Willkommen", @response.body
end
end