Specs for ActionMailer views


#1

Folks,

Has anyone written specs for ActionMailer views? What type should I use.
I
can’t use :view since it expects a controller. Should I make my own
Spec::Rails::Example::ViewExampleGroup class? TIA.


#2

On Sun, Oct 26, 2008 at 5:33 PM, Stephen V. removed_email_address@domain.invalid wrote:

Folks,

Has anyone written specs for ActionMailer views? What type should I use. I
can’t use :view since it expects a controller. Should I make my own
Spec::Rails::Example::ViewExampleGroup class? TIA.

I just use the ViewExampleGroup, which uses its own controller that
renders the view template. The view template isn’t really expecting a
controller. It does not care what is rendering it, as long as the
various instance variables are assigned.

HTH,
David