Guest User

Untitled

a guest
Apr 27th, 2018
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1.  
  2.  
  3. steps_for(:person_signup) do
  4.  
  5.  
  6.  
  7. # Scenario: An invalid signup form is submitted and returned with errors
  8. # Given An invalid signup form
  9. # When The form is submitted
  10. # Then the signup form is shown again
  11. # error messages are displayed
  12. Given("an invalid signup form") do
  13. @controller = post(url(":people"), {:username => 'username', :password => 'password', :full_name => 'full_name', :date_of_birth => nil})
  14. pp @controller
  15. p @controller
  16. end
  17.  
  18.  
  19. When("The form is submitted") do
  20.  
  21.  
  22. end
  23.  
  24.  
  25. Then("The signup form is shown again") do
  26. render signup_form
  27. end
  28.  
  29.  
  30. Then("Error messages are displayed") do
  31. render errors
  32. end
  33.  
  34. end
Add Comment
Please, Sign In to add comment