On Fri, Mar 6, 2009 at 3:55 AM, David Chelimsky <[email protected]> wrote:
> On Thu, Mar 5, 2009 at 7:40 AM, MAwiniarski <[email protected]> wrote:
>>
>> Is there a way to check quantity of tags?
>
> response.should have_tag('div', 4)
Ooh! Thank you; I wish I'd known that before. All this time I've
been using annoyingly complicated xpath tests:
Then /^I should see (\d+) people$/ do |num|
response.should have_xpath("//*[count(*[contains(@class,'person')])=#{num}]")
end
--
Have Fun,
Steve Eley ([email protected])
ESCAPE POD - The Science Fiction Podcast Magazine
http://www.escapepod.org
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users