Created
November 11, 2009 22:26
-
-
Save newtonapple/232373 to your computer and use it in GitHub Desktop.
RSpec Rails have_tag() example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
response.should have_tag("form#my_form") do | |
have_tag('input#hidden_input_id[type=hidden][value=?]', 'secret') | |
end | |
# matches the following HTML: | |
# <form id="my_form" method="POST" action="create"> | |
# <input id="hidden_input_id" value="secret" type="hidden" /> | |
# </form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment