In my Rails 3 app, I've been using jQuery's attr() method to do things like this:
$('#application_dust_type_id').attr('disabled', 'disabled');
I would use Test/Unit, capybara and capybara-webkit to test this with:
assert page.has_selector? 'select[id=application_dust_type_id][disabled=disabled]'
Now, I'm trying to switch to using the prop method, as jQuery recommends:
$('#application_dust_type_id').prop('disabled', true)
But now the above assertion fails, even though the javascript still works the same in the browser.
How can I make an assertion based on an element's property (instead of an attribute) using capybara?