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

Popular posts from this blog

'hasOwnProperty' in javascript -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

java - How to implement an entity bound odata action in olingo v4.3 -