[Catalyst] C::P::Email and testing

Daniel McBrearty danielmcbrearty at gmail.com
Mon Dec 18 04:49:08 GMT 2006

that's a nice idea. thanks Perrin.

On 12/18/06, Perrin Harkins <perrin at elem.com> 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: Catalyst at lists.rawmode.org
> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/

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

More information about the Catalyst mailing list