This repository demonstrates the test naming suggested in the a talk at NDC 2014. A recorded version of the talk is available on http://vimeo.com/97329157 the part about test naming starts at 58:48.
On of the major points about test naming was also made be Kevlin Henney in the following tweet:
Test names should reflect outcome not aspiration: doesn't make sense to see "X should give Y" as a result; on passing, result is "X gives Y"
— Kevlin Henney (@KevlinHenney) June 27, 2013
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
I wrote the example code in steps:
- Write out specification of the
Categorizer
as test cases - Implement the test cases one by one - and refactor on green when appropriate.
- Done.