dashbitco / mox

Mocks and explicit contracts in Elixir
1.35k stars 77 forks source link

Support registered process names for allowances #44

Closed sgrshah closed 6 years ago

sgrshah commented 6 years ago

Mox currently does not support explicit allowances with registered names; it only supports explicit allowances via pids. Attempting to create an allowance for a process using a registered name throws a FunctionClauseError. This PR adds a function clause for allow/3 that accepts locally registered names (atoms) or registry tuples.

Related Issue #43

josevalim commented 6 years ago

:heart: :green_heart: :blue_heart: :yellow_heart: :purple_heart: