Skip to content

Latest commit

 

History

History
61 lines (37 loc) · 1.58 KB

README.md

File metadata and controls

61 lines (37 loc) · 1.58 KB

Author: @skibinska
Maintainer: @skibinska

Roman Numerals Kata

Using Test Driven Development to solve Roman Numerals Kata

Defining the problem

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.

Defining the tools

Test Driven Development

The rules of TDD:

  1. Write a failing test.
  2. Write the simplest bit of code that makes it pass.
  3. Refactor the code to follow the rules of simple design.

This is also called the Red-Green-Refactor cycle of TDD.

TTD lifecycle

The key concept is to write your unit test before you write a line of implementation code.

Ping pong programming

  1. Person A writes a new test and sees that it fails.
  2. Person B implements the code needed to pass the test.
  3. Person B writes the next test and sees that it fails.
  4. Person A implements the code needed to pass the test.

And so on. Refactoring is done whenever the need arises by whoever is driving.

Let’s get started!

1. Clone

Clone the repository by copy-pasting the following command into your terminal:

git clone https://github.com/skibinska/romanizer.git && cd romanizer

2. Go to test/tests.js

and let’s code :)

Solution

To see the solution checkout the solution branch.