I’ll add a mailer method that access the mailer, and a message method
that wraps @expected.
For now you can say:
Notifier.send(:new).activation_instructions(user)
OK - I got a patch into rails so rspec mailer specs can mix in
behavior from an ActionMailer::TestCase::Behavior module. I updated
mailer specs to use this and updated the generator to generate
something more useful.
Peter - is activation_instructions an action? If so you just need to
say “Notifier.activation_instructions(user)” directly in the example.
If it’s a helper method, I’d recommend moving it to a helper module
and spec’ing it there.
WDYT?
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.