# Why avoid mocks

**URL:** <https://forum.elixirforum.com/t/why-avoid-mocks/1396>\
**Category:** Questions\
**Tags:** mocks\
**Created:** [August 18, 2016, 7:59pm UTC](https://forum.elixirforum.com/t/why-avoid-mocks/1396 "2016-08-18T19:59:48Z")\
**Posts on this page:** 1\
**Showing post:** 27

<div class="post-metadata">

**Author:** ![archan937](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/archan937/32/13541_2.png) [@archan937](https://forum.elixirforum.com/u/archan937)\
**Post date:** [January 15, 2019, 10:17am UTC](https://forum.elixirforum.com/t/why-avoid-mocks/1396/27 "2019-01-15T10:17:34Z")

</div>

Released [MecksUnit v0.1.2](https://github.com/archan937/mecks_unit/commit/3d304f363ec4d9f4196936068bbb9a8bbfbb0ad7) in which you can assert function calls with either `called` (returns a boolean) or `assert_called` (raises an error when not having found a match):

```
assert called List.wrap(:foo)
assert_called String.trim(_)

```

---

_[View the full topic](https://forum.elixirforum.com/t/why-avoid-mocks/1396)._
