public
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
Search Repo:
documentation fixes
tsaleh (author)
Mon Apr 28 10:23:41 -0700 2008
commit  051edf42e8d5d8ccddffe96660a4effe5efac25f
tree    d1db8e944fde378bf18e2b23b1699ce936136fb2
parent  c330c0ad2a4d7e7e0ac570d17e6b5f2bdb65cf62
...
77
78
79
80
 
81
82
83
84
85
 
86
87
88
 
89
90
91
92
 
 
93
94
95
...
77
78
79
 
80
81
82
83
84
 
85
86
87
 
88
89
90
 
 
91
92
93
94
95
0
@@ -77,19 +77,19 @@
0
         assert obj.valid?, "Errors: #{pretty_error_messages obj}"
0
       end
0
       
0
- # Asserts that an email was delivered. Can take a blog that can further
0
+ # Asserts that an email was delivered. Can take a block that can further
0
       # narrow down the types of emails you're expecting.
0
       #
0
       # assert_sent_email
0
       #
0
- # passes if ActionMailer::Base.deliveries has an email
0
+ # Passes if ActionMailer::Base.deliveries has an email
0
       #
0
       # assert_sent_email do |email|
0
- # email.subject =~ /hi there/ && email.to == 'none@none.com'
0
+ # email.subject =~ /hi there/ && email.to.include?('none@none.com')
0
       # end
0
       #
0
- # passes if there is an email with subject containing 'hi there' and
0
- # recipient equal to 'none@none.com'
0
+ # Passes if there is an email with subject containing 'hi there' and
0
+ # 'none@none.com' as one of the recipients.
0
       #
0
       def assert_sent_email
0
         emails = ActionMailer::Base.deliveries

Comments

    No one has commented yet.