[rspec-users] have_tag + quantity - question

David Chelimsky dchelimsky at gmail.com
Fri Mar 6 03:55:33 EST 2009


On Thu, Mar 5, 2009 at 7:40 AM, MAwiniarski <MAwiniarski at gmail.com> wrote:
> Greetings,
>
> Is there a way to check quantity of tags?
>
> Something like this:
>
> response.should have_tag('div').quantity(4)

response.should have_tag('div', 4)

Check the assert_select docs (have_tag wraps it) at
http://api.rubyonrails.org/classes/ActionController/Assertions/SelectorAssertions.html#M000547

Cheers,
David

>
> Thanks.
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>


More information about the rspec-users mailing list