I wrote the following in my spec:
emails = ActionMailer::Base.deliveries
emails.length.should eql(2)
response.should send_email {
with_tag('tr', @contact_info[:full_name])
}
knowing that 1) an email is being sent; and 2) the contact info is in
a ‘p’ tag and only in a ‘p’ tag. The length expectation is met –
there are two emails. The send_email expectation is met, but should
not be, as the correct tag would be a ‘p’ and not a ‘tr’.
Any thoughts as to why?
Thx
–s