Add new test illustrating spawning processes
This commit is contained in:
@@ -11,6 +11,12 @@ defmodule Processes do
|
|||||||
assert information[:status] == ___
|
assert information[:status] == ___
|
||||||
end
|
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
|
koan "You can send messages to any process you want" do
|
||||||
send self(), "hola!"
|
send self(), "hola!"
|
||||||
assert_receive ___
|
assert_receive ___
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ defmodule ProcessesTests do
|
|||||||
answers = [
|
answers = [
|
||||||
true,
|
true,
|
||||||
:running,
|
:running,
|
||||||
|
true,
|
||||||
"hola!",
|
"hola!",
|
||||||
:how_are_you?,
|
:how_are_you?,
|
||||||
{:waited_too_long, "I am inpatient"},
|
{:waited_too_long, "I am inpatient"},
|
||||||
|
|||||||
Reference in New Issue
Block a user