- Think of a feature
- Write a failing test
- Make the test pass
- Goto 1
- It forces you to think about your code before writing it.
- It forces your code to be testable. Encourages small and discrete code, which is more reusable.
- It allows you to do refactoring. Maybe you want it to be easier to read, or you come back later and want to do it a different way.
- TDD helps keep new bugs from being introduced.
- Unit tests test individual functions seperate from each other.
- Integration tests test the software stack from the perspective of the user. Testing how lots of things work together.
- Continuous integration: with every commit every test is run and the whole team can see what's happening.
- On our team the people writing the code writes the test.
- In pair programming, you could have one developer write the test and have the other person make it pass.
- It's important to write good tests. You can make a terrible test suite that slows down development
- Cucumber allows non-programmers to interact with tests via user stories
- Travis CI is a hosted continuous integration service. Cooper loves it.
- Can run tests headless using jsdom
- Chai provides helper functions for Mocha
- Have confidence to add new things and refactor bad code without breaking old code
- We proved without a shadow of a doubt that Ruby can add 2 plus 2. And we have a test for it.