summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorpvmart <mao@jiadaochipingguo.local>2015-08-19 19:55:14 +0800
committerpvmart <mao@jiadaochipingguo.local>2015-08-19 19:55:14 +0800
commitc2d9aec502682e836fc58e00f17e60b331e40159 (patch)
treebddb73d2b3f374858a1aa161bc74504cc4155566 /test
parent1f725ffdfcf541a80b9cfd5d304e8ca5067c39d6 (diff)
update ct to play nice with previous commit
Diffstat (limited to 'test')
-rw-r--r--test/mock_pkg_resource.erl8
-rw-r--r--test/rebar_pkg_SUITE.erl2
2 files changed, 5 insertions, 5 deletions
diff --git a/test/mock_pkg_resource.erl b/test/mock_pkg_resource.erl
index eda863b..e5c5645 100644
--- a/test/mock_pkg_resource.erl
+++ b/test/mock_pkg_resource.erl
@@ -35,7 +35,7 @@ mock(Opts) ->
unmock() ->
meck:unload(?MOD),
- meck:unload(rebar_packages).
+ meck:unload(rebar_state).
%%%%%%%%%%%%%%%
%%% Private %%%
@@ -115,10 +115,10 @@ mock_pkg_index(Opts) ->
Dict = find_parts(Deps, Skip),
GraphParts = to_graph_parts(Dict),
Digraph = rebar_digraph:restore_graph(GraphParts),
- meck:new(rebar_packages, [passthrough, no_link]),
- meck:expect(rebar_packages, registry,
+ meck:new(rebar_state, [passthrough, no_link]),
+ meck:expect(rebar_state, registry,
fun(_State) -> {ok, to_registry(Deps)} end),
- meck:expect(rebar_packages, get_packages,
+ meck:expect(rebar_state, packages,
fun(_State) -> {Dict, Digraph} end).
%%%%%%%%%%%%%%%
diff --git a/test/rebar_pkg_SUITE.erl b/test/rebar_pkg_SUITE.erl
index 85bd6f0..e99e787 100644
--- a/test/rebar_pkg_SUITE.erl
+++ b/test/rebar_pkg_SUITE.erl
@@ -171,7 +171,7 @@ mock_config(Name, Config) ->
%% The state returns us a fake registry
meck:new(rebar_state, [passthrough]),
meck:expect(rebar_state, registry,
- fun(_State) -> {ok, fake_registry} end),
+ fun(_State) -> {ok, T} end),
meck:expect(rebar_state, get,
fun(_State, rebar_packages_cdn, _Default) ->
"http://test.com/"