Extract answers from processes.

For some reason I don't quite understand I had to rewrite
assert_receive as I was not getting failures when I was expecting them.
This commit is contained in:
Felipe Sere
2016-03-17 10:04:01 +00:00
parent e4d1cad6df
commit b70e8ea095
3 changed files with 41 additions and 29 deletions

View File

@@ -185,6 +185,25 @@ defmodule KoansHarnessTest do
test_all(PatternMatching, answers)
end
test "Processes" do
answers = [
self,
:running,
"hola!",
:how_are_you?,
{:waited_too_long, "I am inpatient"},
false,
false,
{:exited, :random_reason},
true,
false,
{:exited, :normal},
{:exited, :normal}
]
test_all(Processes, answers)
end
def test_all(module, answers) do
module.all_koans
|> Enum.zip(answers)