Current section

Files

Jump to
tai lib tai test_support mocks client.ex
Raw

lib/tai/test_support/mocks/client.ex

defmodule Tai.TestSupport.Mocks.Client do
def with_mock_server(func) do
try do
func.()
catch
:exit, {:noproc, {GenServer, :call, [Tai.TestSupport.Mocks.Server, _, _]}} ->
{:error, :mock_server_not_started}
end
end
end