diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/mock_pkg_resource.erl | 8 | ||||
-rw-r--r-- | test/rebar_pkg_SUITE.erl | 2 |
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/" |