Author: @skibinska
Maintainer: @skibinska
Using Test Driven Development to solve Roman Numerals Kata
The Romans wrote their numbers using letters:
- I meaning 1,
- V meaning 5,
- X meaning 10,
- L meaning 50,
- C meaning 100.
We would like to be able to convert numbers into their Roman numeral equivalents.
The rules of TDD:
- Write a failing test.
- Write the simplest bit of code that makes it pass.
- Refactor the code to follow the rules of simple design.
This is also called the Red-Green-Refactor cycle of TDD.
The key concept is to write your unit test before you write a line of implementation code.
- Person A writes a new test and sees that it fails.
- Person B implements the code needed to pass the test.
- Person B writes the next test and sees that it fails.
- Person A implements the code needed to pass the test.
And so on. Refactoring is done whenever the need arises by whoever is driving.
Clone the repository by copy-pasting the following command into your terminal:
git clone https://github.com/skibinska/romanizer.git && cd romanizer
and let’s code :)
To see the solution checkout the solution
branch.