我想知道,如何在铁路进行TDD。
我在此阐述的步骤如下:
- 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
我以前从未做过TDD。
这是我所铭记的,但我首先要与你核对。
当然,这只字眼“正确”,我错过一些东西,有点不正确。
如果按照最佳做法看,情况不好,请更正上述清单。
交流经验!