How test emails?


#1

hi, i’m writing all following TDD, but what about a mail system, how can
i test it? how can i test that a mail has been sent? have i to use a
mock?


#2

david wrote:

hi, i’m writing all following TDD, but what about a mail system, how can
i test it? how can i test that a mail has been sent? have i to use a
mock?

ActionMailer has a mock system built in. Read your test.rb and
test_helper.rb files, then either use it or learn from it.


Phlip
http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!


#3

Phlip wrote:

ActionMailer has a mock system built in. Read your test.rb and
test_helper.rb files, then either use it or learn from it.

do you have a link to a guide?
thanks!


#4

On Mar 27, 6:01 pm, david removed_email_address@domain.invalid wrote:

do you have a link to a guide?
thanks!

Agile Web D. with Rails, 2nd Ed. has an excellent chapter on
testing email.

http://pragmaticprogrammer.com/titles/rails/index.html

You can get just the .pdf if you want to.

Jeff