Reuse run_koan for testing

This commit is contained in:
Felipe Sere
2016-03-10 23:16:51 +00:00
parent a6bcd89e7a
commit 4eabc8ac61
2 changed files with 9 additions and 14 deletions

View File

@@ -10,13 +10,6 @@ defmodule KoansHarnessTest do
def all_pass?(module, answers) do
module.all_koans
|> Enum.zip(answers)
|> Enum.map(fn({koan, answer}) -> KoansHarnessTest.test_single_koan(module, koan, answer) end)
end
def test_single_koan(module, name, answer) do
case apply(module, name, [answer]) do
:ok -> :passed
error -> {:error, name, error}
end
|> Enum.map(fn({koan, answer}) -> Runner.run_koan(module, koan, [answer]) end)
end
end