[rspec-users] rails3/rspec2: how to write mailer tests?

nathanvda nathanvda at gmail.com
Thu Sep 2 11:16:58 EDT 2010

This will sound awfully stupid, but i have no idea how to start
writing any mailer tests.

I have a mailer class

    class SmsMailer < ActionMailer::Base

      def fake_sms(envelope)
        mail(:to => envelope.user.email)

how do I test this?
I tried googling for documentation, but was unable to find something
relevant (probable used wrong search terms).

Or do i just do view-tests on the corresponding view?

More information about the rspec-users mailing list