Created
October 5, 2011 22:13
-
-
Save gvarela/1265899 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
Then /^the following fields should be required:$/ do |fields| | |
fields.rows_hash.each do |field, custom_message| | |
node = find('input[type="submit"]', :message => "Unable to locate the submit button to click on") | |
node.click | |
Then %{the "#{field}" field should have the error "#{custom_message.presence || "can't be blank"}"} | |
end | |
end |
This file contains hidden or 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
Scenario: Required fields for the signup form | |
Given I am on the home page | |
When I follow "Sign up for an account" | |
Then the following fields should be required: | |
| Name | can't be blank | | |
| Email | can't be blank | | |
| Password || |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment