#183 ✓invalid
Matt Blodgett

have_selector hash-only support?

Reported by Matt Blodgett | March 2nd, 2009 @ 04:07 PM

It could be nice if you could use have_selector supplying just a hash. So for example, instead of:

response.should have_selector(".some_class", :id => "some_id")

you could just write:

response.should have_selector(:class => "some_class", :id => "some_id")

Comments and changes to this ticket

  • gaffo

    gaffo May 15th, 2009 @ 08:32 PM

    • State changed from “new” to “invalid”

    Matt,
    On an API level we are trying to avoid :option => value style methods as it is very hard to validate what are valid option sets and even harder to keep the documentation up to date. Also, I'm not sure that there is much benefit (you are only typing more characters actually) and it's less clear from a CSS selector syntax what is going on.

    Thank you for the suggestion. If you have more to add, please feel free as to add and if it makes sense we can always re-open this.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Ruby Acceptance Testing for Web applications.

Shared Ticket Bins

People watching this ticket

Pages