that's a nice idea. thanks Perrin.

On 12/18/06, Perrin Harkins <[EMAIL PROTECTED]> wrote:
Daniel McBrearty wrote:
> if you have an action that sends an email, how do you write tests for it?

We do it by subclassing Net::SMTP::Server to write all mail to files in
a temp directory.  Then we send the mail to it and check the contents in
the temp file.  That way the whole code path gets executed and we don't
depend on the local machine having working SMTP and IMAP servers.

- Perrin

_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/



--
Daniel McBrearty
email : danielmcbrearty at gmail.com
www.engoi.com : the multi - language vocab trainer
BTW : 0873928131

_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to