In this assignment you will take a deep dive into both the concepts and mechanics of doing test-driven development (TDD) with the RSpec testing framework, using the Guard tool to automatically re-run tests as you change code and using Webmock to provide "canned" responses for tests that exercise code that communicates with an external service. The basic flow of TDD is red-green-refactor: write a test that fails (red), add code to make that test pass (green), look for opportunities to clean up your code and tests (refactor), repeat until all test cases are done.
The assignment is a divided into the following parts:
- Basic setup of RSpec and Guard, and how to manually and automatically run specs
- From red to green: getting the first spec to pass
- From green to refactor: more controller specs and DRYing out tests
- The model spec: stubbing the Internet with Webmock