public
Rubygem
Description: Makes tests easy on the fingers and the eyes
Homepage: http://www.thoughtbot.com/projects/shoulda
Clone URL: git://github.com/thoughtbot/shoulda.git
forgot to remove an old email assertion
tsaleh (author)
Mon Apr 28 10:18:53 -0700 2008
commit  c330c0ad2a4d7e7e0ac570d17e6b5f2bdb65cf62
tree    2a31aaa8eb3018edd42badc1d6631673014cdf3c
parent  395c8445ee1db9bc47cf2d646da7ac87a7dd4d11
...
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
...
77
78
79
 
 
 
 
 
 
 
 
 
 
 
80
81
82
0
@@ -77,17 +77,6 @@ module ThoughtBot # :nodoc:
0
         assert obj.valid?, "Errors: #{pretty_error_messages obj}"
0
       end
0
       
0
- # Asserts that the block uses ActionMailer to send emails
0
- #
0
- # assert_sends_email(2) { Mailer.deliver_messages }
0
- def assert_sends_email(num = 1, &blk)
0
- ActionMailer::Base.deliveries.clear
0
- blk.call
0
- msg = "Sent #{ActionMailer::Base.deliveries.size} emails, when #{num} expected:\n"
0
- ActionMailer::Base.deliveries.each { |m| msg << " '#{m.subject}' sent to #{m.to.to_sentence}\n" }
0
- assert(num == ActionMailer::Base.deliveries.size, msg)
0
- end
0
-
0
       # Asserts that an email was delivered. Can take a blog that can further
0
       # narrow down the types of emails you're expecting.
0
       #

Comments

    No one has commented yet.