Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- steps_for(:person_signup) do
- # Scenario: An invalid signup form is submitted and returned with errors
- # Given An invalid signup form
- # When The form is submitted
- # Then the signup form is shown again
- # error messages are displayed
- Given("an invalid signup form") do
- @controller = post(url(":people"), {:username => 'username', :password => 'password', :full_name => 'full_name', :date_of_birth => nil})
- pp @controller
- p @controller
- end
- When("The form is submitted") do
- end
- Then("The signup form is shown again") do
- render signup_form
- end
- Then("Error messages are displayed") do
- render errors
- end
- end
Add Comment
Please, Sign In to add comment