problem about meck-Collection of common programming errors


  • Adam Lindberg
    erlang meck
    I have following module-module(bhavcopy_downloader).-export([download/2]).download(From, SaveTo) ->{ok, {{Status, _}, _, Body}} = lhttpc:request(From, “GET”, [], infinity),case Status of 200 -> file:write(SaveTo, Body),true;_ -> falseend.And following tests for the above codefile_download_test_() -> {foreach,fun() ->meck:new(lhttpc)meck:new(file, [unstick])end,fun(_) ->meck:unload(file),meck:unload(lhttpc) end,{“saves the file at specified location”,fun() ->meck:expect(lhtt