[ANN] SimpleMock 0.1.0 - A basic mocking module

Hello! I am happy to announce a little project of mine called SimpleMock.jl.
It has a really simple API to help you test non-deterministic or hard-to-replicate function behaviours like randomness, networking, etc.

using SimpleMock

f(args...) = get(args...)

mock(get) do g
    f(1)  # Would normally throw a `MethodError` for `get`.
    @assert called_once_with(g, 1)
end

It’s implemented with Cassette, and I had lots of fun learning about how that works—I feel like I’ve reached the next level of Julia with that knowledge.

You can browse the short-but-comprehensive documentation here. Feel free to give it a try!

1 Like

Only the dev documentation works. This is common. No idea why.

1 Like

Oops, that’s embarrassing. I set my DOCUMENTER_KEY to only be available on master branch, which means tag builds don’t get to deploy. Fixed, thank you!

2 Likes