I used this description of roman numerals, On Roman Numerals, and continued the kata to also convert numbers over 3000.

These are the tests using Midje that I wrote to test-drive the solution:

and this is the code:

It's possible to convert numbers over 3999:

To document the TDD process I commited the code after every passing test and every refactor.

You can find the commits step by step here.

It's been difficult to derive this recursive algorithm only using strict TDD, but it was also a lot of fun.

You can find the resulting code in GitHub.

*Recently I revisited the Roman Numerals kata and got to a simpler solution.*

**Update:**
## No comments:

## Post a Comment