Created
November 23, 2021 00:33
-
-
Save ihumanable/b720af48a35fba97738abe1b170cddd3 to your computer and use it in GitHub Desktop.
Multiple Mocks Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test "something" do | |
with_mocks([ | |
{ | |
ModuleA, | |
[:passthrough], | |
function_a: fn _ -> :ok end, | |
function_b: fn arg -> | |
{:ok, arg} | |
end | |
}, | |
{ | |
ModuleB, | |
[:passthrough], | |
function_c: fn _ -> false end, | |
function_d: fn _ -> true end | |
} | |
]) do | |
assert Something.here() | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment