Skip to content

Instantly share code, notes, and snippets.

@Gustav-Simonsson
Created January 18, 2013 13:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Gustav-Simonsson/4564450 to your computer and use it in GitHub Desktop.
Save Gustav-Simonsson/4564450 to your computer and use it in GitHub Desktop.
migrate_module
migrate_module(Module, Function, Arity, RemoteNode) ->
%% Assume Arity is 2, general arity solution needed.
RPCFun = fun(Arg1, Arg2) ->
rpc:call(RemoteNode, Module, Function, [Arg1, Arg2]) end,
meck:new(Module),
meck:expect(Module, Function, RPCFun).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment