I wonder how TDD is done in Rails.
Here are the steps I have written down:
- Create migrations and models for the database tables
- Add associations to the models
- Write unit tests for the models and run and see them fail
- Add validations to the models
- Run tests and see them pass, if not, edit the code till they pass
- Create routing, controllers and views (that uses the models)
- Write functional tests
- Run tests and see them fail
- Edit code and see them pass
- Write integration tests
I have never done TDD before.
This is what I had in mind, but I wanted to check with you guys first.
Im sure this isn't very "correct" and that I have missed something and have things in incorrect order.
Could you correct the above list if something isn't according to best practice.
Share your experience!