[rspec-users] content_for

Carl-Johan Kihlbom
Tue, 05 Jun 2007 07:37:15 -0000

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?