Merge pull request #63 from ukutaht/koan_per_process

Koan per process
This commit is contained in:
Uku Taht
2016-04-09 23:24:59 +01:00
6 changed files with 87 additions and 51 deletions

13
test/executor_test.exs Normal file
View File

@@ -0,0 +1,13 @@
defmodule ExecuteTest 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

View File

@@ -232,6 +232,6 @@ defmodule KoansHarnessTest do
end
def run_all(pairs, module) do
Enum.map(pairs, fn ({koan, answer}) -> Runner.run_koan(module, koan, [answer]) end)
Enum.map(pairs, fn ({koan, answer}) -> Execute.run_koan(module, koan, [answer]) end)
end
end

View File

@@ -0,0 +1,7 @@
defmodule PassingKoan do
use Koans
koan "hi there" do
assert 1 == 1
end
end