Undefind function pid/1 - Elixir -
i'm following along old video learning processes. i'm trying send ping i'm getting error test. lib/ping_test.ex:4: undefined function pid/1
i'm not sure i'm doing wrong i'm not familiar elixir yet. here code:
defmodule ping def start receive {:pong, pid} -> send(pid {:ping, self()}) end end end
test
test "it responds pong ping" ping = spawn_link(ping, :start, []) send ping, {:pong, self} assert_receive {:ping, ping} end
error
lib/ping_test.ex:4: undefined function pid/1
so doing wrong?
Comments
Post a Comment