Extract answers from arithmetic module

This commit is contained in:
Felipe Sere
2016-03-15 23:04:23 +00:00
parent 353721412f
commit 245b094e7d
2 changed files with 33 additions and 17 deletions

View File

@@ -97,6 +97,24 @@ defmodule KoansHarnessTest do
test_all(Functions, answers)
end
test "Arithmetic" do
answers = [
4,
3,
12,
3,
3,
2.5,
2,
1,
4,
1,
2
]
test_all(Arithmetic, answers)
end
def test_all(module, answers) do
module.all_koans
|> Enum.zip(answers)