Forum: Ruby on Rails how test emails?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
E5a578d46a1ea27124cf40b6f783be51?d=identicon&s=25 david (Guest)
on 2007-03-27 20:32
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?
Aafa8848c4b764f080b1b31a51eab73d?d=identicon&s=25 Phlip (Guest)
on 2007-03-27 20:37
(Received via mailing list)
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!!
E5a578d46a1ea27124cf40b6f783be51?d=identicon&s=25 david (Guest)
on 2007-03-28 01:01
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!
8217faf2bfdfa7daf10135d41ddd421e?d=identicon&s=25 Jeff Cohen (jeff)
on 2007-03-28 02:00
(Received via mailing list)
On Mar 27, 6:01 pm, david <rails-mailing-l...@andreas-s.net> wrote:
> do you have a link to a guide?
> thanks!

Agile Web Development 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
This topic is locked and can not be replied to.