Extract pure executor of koans

This commit is contained in:
Felipe Sere
2016-04-09 19:16:42 +01:00
parent 153a9df599
commit 7e03cc37a9
5 changed files with 72 additions and 44 deletions

13
test/executor_test.exs Normal file
View File

@@ -0,0 +1,13 @@
defmodule RunnerTest do
use ExUnit.Case
test "passes a koan" do
assert :passed == Execute.run_module(PassingKoan)
end
test "stops at the first failing koan" do
{:failed, %{error: _, file: file, line: line}, SampleKoan, _name} = Execute.run_module(SampleKoan)
assert file == 'test/support/sample_koan.ex'
assert line == 5
end
end