@@ -189,7 +189,7 @@ defmodule Mox do
189189 when the allowance happens. In such a case, you might specify the allowance
190190 as a function in the form `(-> pid())`. This function would be resolved late,
191191 at the very moment of dispatch. If the function does not return an existing
192- PID, it will fail `Mox.UnexpectedCallError`.
192+ PID, Mox will raise a `Mox.UnexpectedCallError` exception .
193193
194194 ### Global mode
195195
@@ -684,6 +684,7 @@ defmodule Mox do
684684 during invocation, the expectation will not succeed.
685685
686686 allow(MyMock, self(), fn -> GenServer.whereis(Deferred) end)
687+
687688 """
688689 @ spec allow ( mock , pid ( ) , term ( ) ) :: mock when mock: t ( )
689690 def allow ( mock , owner_pid , allowed_via ) when is_atom ( mock ) and is_pid ( owner_pid ) do
@@ -827,13 +828,13 @@ defmodule Mox do
827828 "called #{ times ( count + 1 ) } in #{ format_process ( ) } "
828829
829830 { :remote , fun_to_call } ->
830- # it 's possible that Mox.Server is running on a remote node in the cluster. Since the lambda
831- # that we passed is not guaranteed to exist on this node (it might have come from a .exs file)
832- # find the remote node that hosts Mox.Server, and run the lambda on that node.
833-
831+ # It 's possible that Mox.Server is running on a remote node in the cluster. Since the
832+ # function that we passed is not guaranteed to exist on that node (it might have come
833+ # from a .exs file), find the remote node that hosts Mox.Server, and run the function
834+ # on that node.
834835 Mox.Server
835836 |> :global . whereis_name ( )
836- |> node
837+ |> node ( )
837838 |> :rpc . call ( Kernel , :apply , [ fun_to_call , args ] )
838839
839840 { :ok , fun_to_call } ->
0 commit comments