{"action":"closed","issue":{"url":"https://api.github.com/repos/eproxus/meck/issues/142","labels_url":"https://api.github.com/repos/eproxus/meck/issues/142/labels{/name}","comments_url":"https://api.github.com/repos/eproxus/meck/issues/142/comments","events_url":"https://api.github.com/repos/eproxus/meck/issues/142/events","html_url":"https://github.com/eproxus/meck/issues/142","id":74130532,"number":142,"title":"Passthrough'd function call can't seem to call a mocked function","user":{"login":"jordan0day","id":545037,"avatar_url":"https://avatars.githubusercontent.com/u/545037?v=3","gravatar_id":"","url":"https://api.github.com/users/jordan0day","html_url":"https://github.com/jordan0day","followers_url":"https://api.github.com/users/jordan0day/followers","following_url":"https://api.github.com/users/jordan0day/following{/other_user}","gists_url":"https://api.github.com/users/jordan0day/gists{/gist_id}","starred_url":"https://api.github.com/users/jordan0day/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jordan0day/subscriptions","organizations_url":"https://api.github.com/users/jordan0day/orgs","repos_url":"https://api.github.com/users/jordan0day/repos","events_url":"https://api.github.com/users/jordan0day/events{/privacy}","received_events_url":"https://api.github.com/users/jordan0day/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-07T21:17:09Z","updated_at":"2015-05-08T07:25:27Z","closed_at":"2015-05-08T07:25:27Z","body":"If I have a module that is mocked with the passthrough option, and call an unmocked function, which in turn calls a function that I have attempted to set up an expectation for, it appears the original implementation of the mocked function is called, instead.\r\n\r\nUnfortunately I'm not skilled enough at Erlang yet to quite figure out what's going on in the meck code, but I have an example Elixir application showcasing the issue, if that might be helpful for figuring out the issue?\r\n\r\nhttps://github.com/jordan0day/meck_weirdness\r\n\r\nIn essence, there's just one module with two functions: `do_it` and `some_function`. do_it calls some_function.\r\n\r\nin `test/meck_weirdness_test.exs`, you can see in the second that I've set up the mock with the `passthrough` option (via `new/2`), and then set up an expectation on the function `some_function`. The mocked version of `some_function` is not called, though.\r\n\r\nIn the third test, I'm using `new/1`, and then using meck's `passthrough/1` function to call the original implementation of the `do_it` function. I've again mocked `some_function` using `expect`, but again the original implementation of `some_function` is being executed.\r\n\r\nLet me know if there's any more details I can provide to help debug this!"}}