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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user