Skip to content

Commit

Permalink
feat(V): roman numerals 5
Browse files Browse the repository at this point in the history
  • Loading branch information
antonydenyer committed Nov 16, 2017
1 parent 9dcb82d commit b427555
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/roman.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
defmodule Roman do
def to_roman(number) when number == 5 do
"V"
end

def to_roman(number) when number == 4 do
"IV"
Expand Down
4 changes: 4 additions & 0 deletions test/roman_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,8 @@ defmodule RomanTest do
assert Roman.to_roman(4) == "IV"
end

test "five is V" do
assert Roman.to_roman(5) == "V"
end

end

0 comments on commit b427555

Please sign in to comment.