On May 11, 2011, at 4:10 PM, Chris Habgood wrote:

> I just started using rspec.  I have controllers that inherit from an admin 
> controller.  If I modify them to inherit from applicationcontroller the rspec 
> test works.  If I inherit from admincontroller i get "" back for a new 
> template.  Is there something I am missing to get this to work?  The program 
> works when running on the server.

Views are stubbed by default in controller specs [1], so you should always get 
an empty string back unless you tell RSpec to render views [2].

[1] 
http://relishapp.com/rspec/rspec-rails/dir/controller-specs/views-are-stubbed-by-default.
[2] http://relishapp.com/rspec/rspec-rails/dir/controller-specs/render-views

HTH,
David

-- 
You received this message because you are subscribed to the Google Groups 
"rspec" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rspec?hl=en.

Reply via email to