[rspec-devel] Will it be "response.should_have" or "response.body.should_have"?..never mind

James Hughes hughes.james at gmail.com
Fri Feb 9 18:35:39 EST 2007

Sorry. I had some misplaced quotes in my html which were causing
"response.should_have" to die with some incomprehensible error

"expected > (got "" for <div class="list_table'>,
{"class"=>"list_table'>"})" (huh?)

So then I got all excited when everything passed with
response.body.should_have, but I see now that by calling should_have
on body I wasn't calling the should_have method I should have.

On 2/9/07, James Hughes <hughes.james at gmail.com> wrote:
> Hi all,
> I know the assert_select functionality is not a stable part of the api
> yet, but was just wondering where this will end up? I ask because the
> little bit I've seen this mentioned on the list, people seem to be
> using the first option (response.should_have "div.header"), but I had
> to use the second option to get things to work
> (response.body.should_have "div.header").
> Thanks,
> James

More information about the rspec-devel mailing list