Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Public function call is not mocked #83

Closed
tim2CF opened this issue Apr 30, 2018 · 1 comment
Closed

Public function call is not mocked #83

tim2CF opened this issue Apr 30, 2018 · 1 comment

Comments

@tim2CF
Copy link

tim2CF commented Apr 30, 2018

If we have module Foo, wanna to test function bar/1

def bar(data) do
  buzz(data, @someparam)
end

Where buzz/2 is also public function. We try to mock buzz/2 function with :passthrough option, but it not get mocked - original function is called. If we rewrite bar/1 function like this

def bar(data) do
  Foo.buzz(data, @someparam)
end

then buzz/2 function can be mocked. I think this behaviour should be fixed of documented.

@Olshansk
Copy link
Collaborator

This is a duplicate of #71.

We'll track this issue there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants