Skip to content

Instantly share code, notes, and snippets.

@dreid
Created September 28, 2009 17:22
Show Gist options
  • Save dreid/195577 to your computer and use it in GitHub Desktop.
Save dreid/195577 to your computer and use it in GitHub Desktop.
#!/usr/bin/env escript
%% -*- erlang -*-
main(_) ->
code:add_path("effigy/src"),
io:format("-- Before --~n~p~n", [hello:module_info()]),
{ok, _Cover} = cover:start(),
{ok, CoverModule} = cover:compile("hello.erl"),
{why, why, why} = hello:goodbye(),
io:format("-- Cover --~n~p~n", [hello:module_info()]),
{ok, _MockModule} = mock:mock(hello),
io:format("-- Mock --~n~p~n", [hello:module_info()]),
mock:stop(hello),
io:format("-- After Mock --~n~p~n", [hello:module_info()]),
{ok, Filename} = cover:analyze_to_file(hello, "hello.cover", []),
ok.
-module(hello).
-export([goodbye/0]).
goodbye() ->
{why, why, why}.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment