[rspec-users] Testing layouts with RSpec on Rails

Lance Carlson lancecarlson at gmail.com
Tue Oct 9 14:33:58 EDT 2007

I'm not sure you want to test that the yield call works, but merely
that it is being called because you will end up creating an
integration test otherwise. I would suggest just stubbing out the
yield call. I'm pretty sure you can just do template.stub!(:yield) ?

On 10/9/07, Matt Patterson <matt-lists at reprocessed.org> wrote:
> Hey guys,
> Does anyone have any wisdom to share on the subject of speccing Rails
> layouts?
> Most of it's plain old view specs stuff, but are there sensible ways
> to verify things like the yield call? (Mocking doesn't catch that)
> Thanks,
> Matt
> --
>    Matt Patterson | Design & Code
>    <matt at reprocessed org> | http://www.reprocessed.org/
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users

More information about the rspec-users mailing list