diff options
author | Jeremy Kemper <jeremykemper@gmail.com> | 2014-03-15 16:17:19 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremykemper@gmail.com> | 2014-03-15 16:17:19 -0700 |
commit | 147f0ae63364e60bdc855b1a8f7c94567f4a8624 (patch) | |
tree | 24b84c5c2b4a4aab653af5c6c2f31474fe9b5913 | |
parent | 2d171bdc89b1a29c098477669e14d92b534baf7e (diff) | |
parent | f870c4d063f6ac3b5fe96670955a08fcd7e15e67 (diff) | |
download | rails-147f0ae63364e60bdc855b1a8f7c94567f4a8624.tar.gz rails-147f0ae63364e60bdc855b1a8f7c94567f4a8624.tar.bz2 rails-147f0ae63364e60bdc855b1a8f7c94567f4a8624.zip |
Merge pull request #14395 from arthurnn/fix_mailer_preview_test
Fix MailerPreview broken tests
-rw-r--r-- | actionmailer/test/base_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index d4a89a17ee..b66e5bd6a3 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -594,7 +594,7 @@ class BaseTest < ActiveSupport::TestCase test "you can register a preview interceptor to the mail object that gets passed the mail object before previewing" do ActionMailer::Base.register_preview_interceptor(MyInterceptor) mail = BaseMailer.welcome - BaseMailerPreview.stubs(:welcome).returns(mail) + BaseMailerPreview.any_instance.stubs(:welcome).returns(mail) MyInterceptor.expects(:previewing_email).with(mail) BaseMailerPreview.call(:welcome) end @@ -602,7 +602,7 @@ class BaseTest < ActiveSupport::TestCase test "you can register a preview interceptor using its stringified name to the mail object that gets passed the mail object before previewing" do ActionMailer::Base.register_preview_interceptor("BaseTest::MyInterceptor") mail = BaseMailer.welcome - BaseMailerPreview.stubs(:welcome).returns(mail) + BaseMailerPreview.any_instance.stubs(:welcome).returns(mail) MyInterceptor.expects(:previewing_email).with(mail) BaseMailerPreview.call(:welcome) end @@ -610,7 +610,7 @@ class BaseTest < ActiveSupport::TestCase test "you can register an interceptor using its symbolized underscored name to the mail object that gets passed the mail object before previewing" do ActionMailer::Base.register_preview_interceptor(:"base_test/my_interceptor") mail = BaseMailer.welcome - BaseMailerPreview.stubs(:welcome).returns(mail) + BaseMailerPreview.any_instance.stubs(:welcome).returns(mail) MyInterceptor.expects(:previewing_email).with(mail) BaseMailerPreview.call(:welcome) end @@ -618,7 +618,7 @@ class BaseTest < ActiveSupport::TestCase test "you can register multiple preview interceptors to the mail object that both get passed the mail object before previewing" do ActionMailer::Base.register_preview_interceptors("BaseTest::MyInterceptor", MySecondInterceptor) mail = BaseMailer.welcome - BaseMailerPreview.stubs(:welcome).returns(mail) + BaseMailerPreview.any_instance.stubs(:welcome).returns(mail) MyInterceptor.expects(:previewing_email).with(mail) MySecondInterceptor.expects(:previewing_email).with(mail) BaseMailerPreview.call(:welcome) |