From bddaf8193aa473fd127dd500f82f06399d31c62a Mon Sep 17 00:00:00 2001 From: Godfrey Chan Date: Wed, 15 Oct 2014 02:09:56 -0700 Subject: [PATCH] HAX: check the `message` object, not the `MessageDelivery` object See 669bf73 for background. It's probably better to rewrite these test without using the internal `NullMail` class anyway. --- spec/mailers/user_notifications_spec.rb | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/spec/mailers/user_notifications_spec.rb b/spec/mailers/user_notifications_spec.rb index f1b3728addf..a8ddc4246df 100644 --- a/spec/mailers/user_notifications_spec.rb +++ b/spec/mailers/user_notifications_spec.rb @@ -112,14 +112,21 @@ describe UserNotifications do # in mailing list mode user_replies is not sent through response.user.mailing_list_mode = true mail = UserNotifications.user_replied(response.user, post: response, notification: notification) - mail.class.should == ActionMailer::Base::NullMail + if rails_master? + mail.message.class.should == ActionMailer::Base::NullMail + else + mail.class.should == ActionMailer::Base::NullMail + end response.user.mailing_list_mode = nil mail = UserNotifications.user_replied(response.user, post: response, notification: notification) - mail.class.should_not == ActionMailer::Base::NullMail - + if rails_master? + mail.message.class.should_not == ActionMailer::Base::NullMail + else + mail.class.should_not == ActionMailer::Base::NullMail + end end end