[rspec-users] matcher to see if radio button is selected at page load

Pau Cor lists at ruby-forum.com
Wed Nov 26 02:10:15 EST 2008

Zach Dennis wrote:
> response.should
> have_tag("input[type=radio][checked=checked][name=?][valued=?]",
> "your[button]", "foo")

Wouldn't that require me to do this: <input>My label</input>
My validator is saying that is not valid XHTML.

Thanks for the suggestion. I definitely haven't looked into the power of 
have_tag enough.

Posted via http://www.ruby-forum.com/.

More information about the rspec-users mailing list