Skip to content

Commit

Permalink
Minor updates to make rebar compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
jtuple committed Mar 28, 2011
1 parent b91a1dd commit 09c5303
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
File renamed without changes.
9 changes: 9 additions & 0 deletions ebin/erlymock.app
@@ -0,0 +1,9 @@
{application, erlymock,
[{description, "An EasyMock inspired mocking library for erlang."},
{vsn, "3.0.0"},
{modules, [em]},
{registered, []},
{included_applications, []},
{applications, [kernel, stdlib]},
{env, []},
{start_phases, []}]}.
Binary file added rebar
Binary file not shown.
3 changes: 3 additions & 0 deletions rebar.config
@@ -0,0 +1,3 @@
{require_otp_vsn, "R13B04|R14"}.
{cover_enabled, true}.
{erl_opts, [debug_info, fail_on_warning]}.
10 changes: 5 additions & 5 deletions src/em.erl
Expand Up @@ -462,8 +462,8 @@ invoke(M, Mod, Fun, Args) ->
%%------------------------------------------------------------------------------
unload_mock_modules(#state{mocked_modules = MMs}) ->
[begin
code:delete(Mod),
code:purge(Mod),
code:delete(Mod),
code:purge(Mod),
case MaybeBin of
nothing ->
ignore;
Expand All @@ -473,8 +473,8 @@ unload_mock_modules(#state{mocked_modules = MMs}) ->
end
|| {Mod, MaybeBin} <- MMs].

test() ->
ok.
%% test() ->
%% ok.

%%------------------------------------------------------------------------------
%% @private
Expand All @@ -491,7 +491,7 @@ install_mock_modules(#state{strict = ExpectationsStrict,
install_mock_module(Mod, Expectations) ->
MaybeBin = get_cover_compiled_binary(Mod),
ModHeaderSyn = [erl_syntax:attribute(erl_syntax:atom(module),
[erl_syntax:atom(Mod)]),
[erl_syntax:atom(Mod)]),
erl_syntax:attribute(erl_syntax:atom(compile),
[erl_syntax:list(
[erl_syntax:atom(export_all)])])],
Expand Down

0 comments on commit 09c5303

Please sign in to comment.