[rspec-devel] [ rspec-Bugs-6903 ] Rendering a partial in a view makes the view spec blow up

noreply at rubyforge.org noreply at rubyforge.org
Wed Nov 29 01:33:25 EST 2006


Bugs item #6903, was opened at 2006-11-27 02:12
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6903&group_id=797

>Category: rails plugin
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 3
Submitted By: Pat Maddox (pergesu)
>Assigned to: David Chelimsky (dchelimsky)
Summary: Rendering a partial in a view makes the view spec blow up

Initial Comment:
In a view spec, say you call
render "people/show"

and the show.rhtml file consists solely of
<%= render :partial => "person", :object => @person %>

the spec blows up with
No rhtml, rxml, rjs or delegate template found for spec/rails/view_spec/_person in /Users/pergesu/work/givelist/trunk/config/../app/views

Changing the render call to be
render :partial => "people/person", :object => @person

works fine.  So the view spec is making something relative to the root views dir, when *I think* it should probably be relative to people in this case.

----------------------------------------------------------------------

>Comment By: David Chelimsky (dchelimsky)
Date: 2006-11-29 06:33

Message:
Fixed in trunk (rev 1174)

Works for all following forms:

<%= render :partial => "person", :object => @person %>
<%= render :partial => "people/person", :object => @person %>
<%= render :partial => "person", :collection => @people %>
<%= render :partial => "people/person", :collection => @people %>

----------------------------------------------------------------------

Comment By: Aslak Hellesøy (aslak_hellesoy)
Date: 2006-11-27 08:56

Message:
Is there any chance you could reproduce this in the demo app and attach a patch so I can reproduce this easily? It would also be helpful to know what Rails/Rspec version/revision you're using.

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6903&group_id=797


More information about the rspec-devel mailing list