[rspec-users] content_for

Carl-Johan Kihlbom kihlbom at gmail.com
Tue Jun 5 03:37:15 EDT 2007

On 6/4/07, Moses Hohman <moses.hohman at gmail.com> wrote:
> 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

Moses, this doesn't work for me. I tried the following:

response.should have_tag("div#sidebar")

That didn't work (no matching tag found). I also tried similar
approaches to matching tags within the sidebar, without any luck.

Any ideas?

More information about the rspec-users mailing list