Skip to content

Commit

Permalink
enable calling Mimic.allow when not using expectations
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelst authored and edgurgel committed Oct 28, 2024
1 parent e525d65 commit 8812b14
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/mimic/server.ex
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,9 @@ defmodule Mimic.Server do
case :ets.lookup(__MODULE__, {owner_pid, module}) do
[{{^owner_pid, ^module}, actual_owner_pid}] ->
:ets.insert(__MODULE__, {{allowed_pid, module}, actual_owner_pid})

[] ->
:ok
end

{:reply, {:ok, module}, state}
Expand Down

0 comments on commit 8812b14

Please sign in to comment.