dear all,<div><br></div><div>i'm trying to use the meck framework (<a href="https://github.com/eproxus/meck">https://github.com/eproxus/meck</a>) and i can't seem to find a way to test that a function gets called with the appropriate values.</div>
<div><br></div><div>for instance:</div><div><br></div><div>%%%%%%%%%%%%%%%%%%%%</div><div><div><br></div><div>-module(example).</div><div>-compile(export_all).</div><div><br></div><div>get_config() -></div><div><span class="Apple-tab-span" style="white-space:pre">   </span>mocked:myfun("test.config").</div>
<div><br></div><div>-ifdef(TEST).</div><div>-include_lib("eunit/include/eunit.hrl").</div><div><br></div><div>get_config_test_() -></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>meck:new(mocked),</div>
<div><span class="Apple-tab-span" style="white-space:pre">      </span>meck:expect(mocked, myfun, fun(Filename) -> ok end),</div><div><span class="Apple-tab-span" style="white-space:pre">      </span>?_assertEqual(ok, get_config()),</div>
<div><span class="Apple-tab-span" style="white-space:pre">      </span>?_assert(meck:validate(mocked)).</div><div>-endif.</div></div><div><br></div><div>%%%%%%%%%%%%%%%%%%%%</div><div><br></div><div>i'd like to test that mocked:myfun/1 gets called with "test.config" as parameter.</div>
<div><br></div><div>is this possible?</div><div><br></div><div>r.</div>