Re: [rspec-users] view spec on rails questions

2008-03-11 Thread Zach Dennis
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 Linowes
[EMAIL PROTECTED] wrote:
 Hi
  I have a couple of questions

  1)
  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/ )

  2)
  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


  ___
  rspec-users mailing list
  rspec-users@rubyforge.org
  http://rubyforge.org/mailman/listinfo/rspec-users




-- 
Zach Dennis
http://www.continuousthinking.com
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users


[rspec-users] view spec on rails questions

2008-03-10 Thread Jonathan Linowes
Hi
I have a couple of questions

1)
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/ )

2)
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


___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users