mirror of
https://github.com/thoughtbot/shoulda-matchers.git
synced 2022-11-09 12:01:38 -05:00
deprecate #assert_sent_email and assert_did_not_send_email
This commit is contained in:
parent
7a468f9b1b
commit
207ace93f8
1 changed files with 1 additions and 1 deletions
|
@ -1,4 +1,3 @@
|
|||
### TODO: replace with matches
|
||||
module Shoulda # :nodoc:
|
||||
module ActionMailer # :nodoc:
|
||||
module Assertions
|
||||
|
@ -32,6 +31,7 @@ module Shoulda # :nodoc:
|
|||
#
|
||||
# assert_did_not_send_email
|
||||
def assert_did_not_send_email
|
||||
::ActiveSupport::Deprecation.warn("use: should_not have_sent_email")
|
||||
msg = "Sent #{::ActionMailer::Base.deliveries.size} emails.\n"
|
||||
::ActionMailer::Base.deliveries.each { |m| msg << " '#{m.subject}' sent to #{m.to.to_sentence}\n" }
|
||||
assert ::ActionMailer::Base.deliveries.empty?, msg
|
||||
|
|
Loading…
Add table
Reference in a new issue