From c2d9aec502682e836fc58e00f17e60b331e40159 Mon Sep 17 00:00:00 2001 From: pvmart Date: Wed, 19 Aug 2015 19:55:14 +0800 Subject: update ct to play nice with previous commit --- test/mock_pkg_resource.erl | 8 ++++---- test/rebar_pkg_SUITE.erl | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'test') 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/" -- cgit v1.1