# \[ANN\] SimpleMock 0.1.0 - A basic mocking module

**URL:** <https://discourse.julialang.org/t/ann-simplemock-0-1-0-a-basic-mocking-module/29189>\
**Category:** Package Announcements\
**Tags:** testing\
**Created:** [September 26, 2019, 10:57am UTC](https://discourse.julialang.org/t/ann-simplemock-0-1-0-a-basic-mocking-module/29189 "2019-09-26T10:57:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![christopher-dG](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/christopher-dg/32/7387_2.png) [@christopher-dG](https://discourse.julialang.org/u/christopher-dG)\
**Post date:** [September 26, 2019, 10:57am UTC](https://discourse.julialang.org/t/ann-simplemock-0-1-0-a-basic-mocking-module/29189/1 "2019-09-26T10:57:58Z")

</div>

Hello! I am happy to announce a little project of mine called [SimpleMock.jl](https://github.com/christopher-dG/SimpleMock.jl).  
It has a really simple API to help you test non-deterministic or hard-to-replicate function behaviours like randomness, networking, etc.

```julia
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](https://christopher-dg.github.io/SimpleMock.jl/stable). Feel free to give it a try!

---

<div class="post-metadata">

**Author:** ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Post date:** [September 26, 2019, 12:42pm UTC](https://discourse.julialang.org/t/ann-simplemock-0-1-0-a-basic-mocking-module/29189/2 "2019-09-26T12:42:04Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![christopher-dG](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/christopher-dg/32/7387_2.png) [@christopher-dG](https://discourse.julialang.org/u/christopher-dG)\
**Post date:** [September 26, 2019, 1:51pm UTC](https://discourse.julialang.org/t/ann-simplemock-0-1-0-a-basic-mocking-module/29189/3 "2019-09-26T13:51:29Z")

</div>

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!
