An exercise for adding micro-tests after code is written.
Get the code:
git clone https://github.com/pete-the-programmer/tdd-ex-micro1
Start by testing simple, yet interesting behaviours, and progressively get more complex.
For example:
- How many letters need to be displayed?
- Is there a limit to the number of letters?
- What happens when the user makes a guess?
- What happens when the user guesses the same letter twice?
- How can we tell between an incorrect and correct guess?
- What are the limits on numbers of guesses?
- How does the user win or lose?