[rspec-users] "Tricks" for testing after_create callback???
rick.denatale at gmail.com
Thu Dec 13 07:57:02 EST 2007
On 12/12/07, Pat Maddox <pergesu at gmail.com> wrote:
> I would not mock the call, and would instead just let the mailer do
> its thing. You can verify that a message was sent, match the
> subject/content, etc. It's very lightweight so there's no reason not
> to use it.
The problem with this is that it combines testing the sending of the
message with testing how it's rendered.
I prefer to do the latter in the context of testing the mailer.
My blog on Ruby
More information about the rspec-users