Note: Final code is in the solution branch, refer to the individual commits for the order of things
- Go over the history and motivations behind TDD
- Tests as documentation
- Preventing over-engineering
- Easier refactoring, preventing regressions
- Red, Green, Refactor
- Mention feature testing, but this lab won't go into it
- Explain
rspec init, point out random order in config file - Do Rectangle initialization and perimeter as a code-along
- Do Rectangle area as a lab, then demo solution and introduce
before - Do Circle as a lab, pointing to RSpec docs to find matchers
- Demo solution for Circle and explain
beforevs.let - Do Triangle as a lab, giving the option to proceed to the bonuses
- Demo solution for Triangle
- Demo bonus for Triangle, introducing error matchers and refactoring with private method