Re:Should we write specs for validations?
by blanecordes on Thursday February 09, 2012 @10:00AM
(#3571346)
What is the best way to learn writing tests?
[ Parent
| on HN ]
Re:Should we write specs for validations?
by darthdeus on Thursday February 09, 2012 @10:56AM
(#3571569)
The best thing is of course learn by actually doing it. Your tests don't have to be anything complicated, basically what you're doing is writing down your own assumptions about the code.
Those can be something like "when someone upvotes on a comment, then the comment should have +1 score" ...
Another thing that might help you is watching someone actually do TDD, for which I can recommend Destroy All Software screencasts https://www.destroyallsoftware.com/