<p>Then you will implement your mock version of io:get_line that way. The mock framework merely dispatches the call. That's all. </p>
<div class="gmail_quote">On May 22, 2011 2:40 AM, "Alyssa Kwan" <<a href="mailto:alyssa.c.kwan@gmail.com">alyssa.c.kwan@gmail.com</a>> wrote:<br type="attribution">> I'm sorry, I wasn't being specific.  Is there any way to mock a sequence of calls to the same function?  Like if I call io:get_line (or a wrapper because it's protected), how do I get it to return a different value for the first call and the second call?<br>
> <br>> Also, will it expect exactly two calls as well?  And does meck record call order for different functions?<br>> <br>> On May 21, 2011, at 1:43 PM, Edward Wang wrote:<br>> <br>>> Try meck <a href="https://github.com/eproxus/meck">https://github.com/eproxus/meck</a><br>
>> <br>>> I used it to mock inet:getifaddrs/0 etc.<br>>> <br>>> On Sun, May 22, 2011 at 1:31 AM, Alyssa Kwan <<a href="mailto:alyssa.c.kwan@gmail.com">alyssa.c.kwan@gmail.com</a>> wrote:<br>>> Hi everyone!<br>
>> <br>>> Are there any mocking libraries written that allow you to expect a sequence of calls and return a different value for each call?  A mocking library that allows passthrough would be ideal.<br>>> <br>
>> Thanks!<br>>> Alyssa<br>>> _______________________________________________<br>>> erlang-questions mailing list<br>>> <a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
>> <a href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a><br>>> <br>> <br></div>