Add new test illustrating spawning processes

This commit is contained in:
Jay Hayes
2016-05-02 18:49:40 -05:00
parent 3892c0477e
commit bef1cf5028
2 changed files with 7 additions and 0 deletions

View File

@@ -11,6 +11,12 @@ defmodule Processes do
assert information[:status] == ___
end
koan "New processes are spawned" do
pid = spawn(fn -> nil end)
assert Process.alive?(pid) == ___
end
koan "You can send messages to any process you want" do
send self(), "hola!"
assert_receive ___

View File

@@ -6,6 +6,7 @@ defmodule ProcessesTests do
answers = [
true,
:running,
true,
"hola!",
:how_are_you?,
{:waited_too_long, "I am inpatient"},