View spec on rails questions

Hi
I have a couple of questions

how do you test the response inside a content_for block
I see reference to it in the release notes but dont know where to
find it (tried http://rspec.info/rdoc-rails/ )

I dont seem to be able to stub partials in a different directory eg
<%= render :partial => “foos/show” %>
And I put this in the spec
template.stub_render(:partial => “foos/show”)
the stub gets ignored and the partial still gets rendered
It works fine with partials in the same directory

I’m runing rspec 1.1.3
thanks
linoj

For content_for blocks we have a separate “testing.html.erb” layout
which we use when rendering our view from our spec. We then ensure the
things generated in content_for are rendered correctly…

ie: render “foo/index”, :layout => “testing”

Zach

On Mon, Mar 10, 2008 at 11:23 PM, Jonathan L.