代码拉取完成,页面将自动刷新
From: Peter Lemenkov <[email protected]>
Date: Tue, 4 Jul 2017 16:57:00 +0300
Subject: [PATCH] Workaround for Rebar 2.x
Signed-off-by: Peter Lemenkov <[email protected]>
diff --git a/test/meck_tests.erl b/test/meck_tests.erl
index 270186c..401c466 100644
--- a/test/meck_tests.erl
+++ b/test/meck_tests.erl
@@ -1078,13 +1078,7 @@ cover_options_fail_({_OldPath, Src, Module}) ->
test_file(Module, Ext) ->
filename:join(test_dir(), atom_to_list(Module) ++ Ext).
-test_dir() ->
- case code:which(?MODULE) of
- Filename when is_list(Filename) ->
- filename:dirname(Filename);
- Atom when is_atom(Atom) ->
- error({test_dir_not_found, ?MODULE, Atom})
- end.
+test_dir() -> "../" ++ filename:dirname(?FILE).
test_include() -> filename:join(test_dir(), "include").
@@ -1098,14 +1092,14 @@ run_mock_no_cover_file(Module) ->
%% @doc Verify that passthrough calls _don't_ appear in cover
%% analysis.
no_cover_passthrough_test() ->
- {ok, _} = cover:compile("test/meck_test_module.erl"),
+ {ok, _} = cover:compile(test_file(meck_test_module, ".erl")),
{ok, {meck_test_module, {0,3}}} = cover:analyze(meck_test_module, module),
passthrough_test([no_passthrough_cover]),
{ok, {meck_test_module, {0,3}}} = cover:analyze(meck_test_module, module).
%% @doc Verify that passthrough calls appear in cover analysis.
cover_passthrough_test() ->
- {ok, _} = cover:compile("test/meck_test_module.erl"),
+ {ok, _} = cover:compile(test_file(meck_test_module, ".erl")),
?assertEqual({ok, {meck_test_module, {0,3}}},
cover:analyze(meck_test_module, module)),
passthrough_test([]),
@@ -1113,7 +1107,7 @@ cover_passthrough_test() ->
cover:analyze(meck_test_module, module)).
cover_path_test() ->
- {ok, _} = cover:compile("test/meck_test_module.erl"),
+ {ok, _} = cover:compile(test_file(meck_test_module, ".erl")),
?assertEqual({ok, {meck_test_module, {0,3}}},
cover:analyze(meck_test_module, module)),
ok = meck:new(meck_test_module, [passthrough]),
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。