jnicklas/capybara — pull request #1065 by twalpole (2013-04-22 21:10:17+00:00)
Title: Change racktest to respond like selenium when retrieving boolean attributes

This changes the racktest driver to respond with "true" or nil when retrieving boolean attributes as the selenium driver does. I'm ambivalent about this change but @abotalov feels pretty strongly about having the same behavior from all drivers so I have implemented this. I'm not loving the "true"/nil responses (which come from the webdriver spec) and maybe it would be better to change both drivers to respond with true/false for boolean attributes. Either way getting tests that exactly match the expected returns will encourage other drivers to do the same thing. I had code in Capybara::Node::Simple that verified the specified attribute name was valid for the current element before treating it as a boolean attrribute, however after looking at Selenium I removed it since they don't seem to verify that.