I expect this isn't a bug and I'm doing something wrong on my end, but this is the behavior I'm seeing:
foo.erl
-module(foo).
-export([bar/0]).
bar() -> bar.
Baby steps...
1> meck:new(foo).
ok
2> meck:expect(foo, bar, fun() -> mocked end).
ok
3> foo:bar().
mocked
Passthrough attempt 1...
1> meck:new(foo, [passthrough]).
ok
2> foo:bar().
** exception error: undefined function foo_meck_original:bar/0
in function foo:bar/0
called as foo:bar()
And passthrough attempt 2...
1> meck:new(foo).
ok
2> meck:expect(foo, bar, fun() -> meck:passthrough([]) end).
ok
3> foo:bar().
** exception error: undefined function foo_meck_original:bar/0
in function foo:bar/0
called as foo:bar()
I expect this isn't a bug and I'm doing something wrong on my end, but this is the behavior I'm seeing:
foo.erl
Baby steps...
Passthrough attempt 1...
And passthrough attempt 2...