[rspec-users] content_for

Moses Hohman
Mon, 04 Jun 2007 14:50:27 -0000

What we usually do in this case is render the view with the layout and then
check the contents of the sidebar div. However, this does lead to having to
stub out additional things you don''t care about in your example. If
anyone
has a better plan I''d like to know, too.

Moses

On 6/4/07, Carl-Johan Kihlbom <kihlbom at gmail.com>
wrote:
>
> On 5/23/07, Kyle Hargraves <philodespotos at gmail.com> wrote:
> > Any ideas how I would go about writing specs for views which make use
> > of content_for?
> >
> > I''d like, for example, to be able to specify that ABC view
places XYZ
> > in the sidebar, which I do using content_for(:sidebar).
> >
> > Am I missing something obvious?
> >
> > Kyle
>
> I have the same problem, several of my views use content_for to
> populate a sidebar. How can I write examples for them?
>
> / CJ
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>
-------------- next part --------------
An HTML attachment was scrubbed...