TDD steps:
1, Write a test that describes some shortcoming or missing feature in the code.
2, Run the tests.
3, Write just enough code to make this test pass.
4, Run the tests again.
5, Refactor.
6, Write a test to define a new feature and start the process all over again.
Always remember:
1, Code doesn't exist yet until it's tested.
2, Run tests religiously.
see more:
1, http://ruby.about.com/od/advancedruby/a/tdd.htm
–
Liu Lantao
College of Information Science and Technology, Beijing Normal University
EMAIL: liulantao ( at ) gmail ( dot ) com ;
WEBSITE: http://www.liulantao.com/ .
——