How can I confirm the absence of an HTML attribute in a Rails RSpec test?
I can verify that the tag inputhas an attribute valueand that it is an empty string:
response.should have_tag("input[name=?][value=?]", "user[password]", "")
response.should have_tag("input[name=?][value=?]", "user[password_confirmation]", "")
But I want to check that my input fields do not have an attribute at all value(i.e. an empty field).
source
share