# 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:** 23

<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 12, 2019, 2:35am UTC](https://forum.elixirforum.com/t/why-avoid-mocks/1396/23 "2019-01-12T02:35:37Z")

</div>

You mean indirectly? Then the answer is yes. I have added the module `Foo` within the example which invokes `String.trim()` and the tests succeed

---

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