Permalink
Browse files

forgot to remove an old email assertion

  • Loading branch information...
1 parent 395c844 commit c330c0ad2a4d7e7e0ac570d17e6b5f2bdb65cf62 Tammer Saleh committed Apr 28, 2008
Showing with 0 additions and 11 deletions.
  1. +0 −11 lib/shoulda/general.rb
View
@@ -77,17 +77,6 @@ def assert_valid(obj)
assert obj.valid?, "Errors: #{pretty_error_messages obj}"
end
- # Asserts that the block uses ActionMailer to send emails
- #
- # assert_sends_email(2) { Mailer.deliver_messages }
- def assert_sends_email(num = 1, &blk)
- ActionMailer::Base.deliveries.clear
- blk.call
- msg = "Sent #{ActionMailer::Base.deliveries.size} emails, when #{num} expected:\n"
- ActionMailer::Base.deliveries.each { |m| msg << " '#{m.subject}' sent to #{m.to.to_sentence}\n" }
- assert(num == ActionMailer::Base.deliveries.size, msg)
- end
-
# Asserts that an email was delivered. Can take a blog that can further
# narrow down the types of emails you're expecting.
#

0 comments on commit c330c0a

Please sign in to comment.