[rspec-users] Problem with ActionMailer in controller specs - works in model specs

Brad brad.forsyth at inspire2go.com
Mon Nov 30 12:48:00 EST 2009


I am having a problem with my controller tests that include
ActionMailer.  The tests work for the model test, e.g. I have a
UserNotifier model that sends account activation e-mails and the
spec's work fine.  When I run the UsersController spec's that test
some of the same functionality (e.g. uses the UserNotifier model),  I
get:

ArgumentError in ... wrong number of arguments (0 for 1)
.../lib/action_mailer/base.rb:551:in 'content_type'

The UserNotifier model tests also fail when I run a complete test
(e.g. spec spec).  It passes when I run it standalone.  This happens
using both Rails 2.3.4 and the latest 2.3.5.

Is this a controller spec setup issue?

Thanks for any guidance...
Brad


More information about the rspec-users mailing list