[rspec-users] Missing template in helper specs with a render

Alex Pressberg lists at ruby-forum.com
Tue Aug 24 05:19:17 EDT 2010

Yes! We do use render in helpers to a great extent and are bitten by the 
"missing template in view path" error too. Any workarounds? Can the view 
path be easily fixed for helper specs in Rspec 1.3?
Does Rspec 2 already support this?

Cheers, Alex

David Chelimsky wrote:
> On Thu, Jun 4, 2009 at 8:41 PM, Charlie Bowman 
> <charlesmbowman at gmail.com> wrote:
>> I have a helper method that does a "render :partial".� The method works fine
>> within the app (Rails 2.3.2).� In rspec (1.2.6) I get an error ("Missing
>> template /comments/_comment.erb in view path"
>> It seems that rspec when running helper tests doesn't set the view_path so
>> rails doens't know where to look for the templates.� Is there a way to run
>> helper specs with the same setup as controller specs?
> There is no support for rendering in helper specs as of yet. Please
> file a feature request if you think there should be. I have,
> personally, never rendered from a helper. Anybody else?

Posted via http://www.ruby-forum.com/.

More information about the rspec-users mailing list