Skip to content

Instantly share code, notes, and snippets.

@boy-jer
Last active August 12, 2016 10:53
Show Gist options
  • Save boy-jer/07785379c0e02b9300673f306369eda1 to your computer and use it in GitHub Desktop.
Save boy-jer/07785379c0e02b9300673f306369eda1 to your computer and use it in GitHub Desktop.
How I learned to love testing by Gregg Polack. https://www.youtube.com/watch?v=guSUuMMDl2E

http://larsgebhardt.de/build-your-own-real-estate-listing-service-with-ruby-on-rails-and-sphinx-part-1/ http://larsgebhardt.de/build-your-own-real-estate-listing-service-with-ruby-on-rails-and-sphinx-part-2/ http://larsgebhardt.de/user-authentication-with-ruby-on-rails-rspec-and-capybara/

Example of a feature request for a action which submits a credit card

Here is the specification for the above feature

  • The user can submit their credit card
  • The server attempts to charge their credit card
  • on failure display an error
  • on failure render credit card form again
  • on success store transction
  • on successs redirect to receipt page

Example of Email Password remider action specification We will write out the full specification for the action and each spec refers to what will be tested

A user who forgets their password:

  • should be able to enter and submit their email address
  • should be sent an email if their email address is valid
  • should be shown a notice if their email address is valid
  • should be redirected to the login screen if their email address is valid
  • should be shown an error if their email isn't recognized an shown the form again
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment