jjh42 / mock

Mocking library for Elixir language
MIT License
646 stars 81 forks source link

Assert called doesn't work on second function call #110

Closed maksimf closed 4 years ago

maksimf commented 4 years ago

Suppose I'm mocking the Utils module, function foo/1. In my test foo/1 is being called 2 times in the following order:

  1. foo(:a)
  2. foo(:b)

And I need to assert that foo/1 was called with :b, which doesn't work and I get:

Expected call but did not receive it. Calls which were received:
0. Elixir.Utils.foo(:a)

I did make sure that foo/1 is actually being called with :b by having IEx.pry() inside foo/1.