You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2017/09/28 21:02:42 UTC
[34/50] meck commit: updated refs/heads/master to 3544aca
Migrate to Rebar 3
This change expects Meck to be built with Rebar 3 from now on. Due to it
not being compatible with Rebar 3, the optional dependency on Hamcrest
has been removed. Meck still supports matchers so it should still be
compatible, but it is no longer tested.
Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/0e6c040d
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/0e6c040d
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/0e6c040d
Branch: refs/heads/master
Commit: 0e6c040dcee99b39769828377c073c3b67a1794d
Parents: 36b208e
Author: Adam Lindberg <he...@alind.io>
Authored: Thu Feb 2 10:02:32 2017 +0100
Committer: Adam Lindberg <he...@alind.io>
Committed: Wed Jun 28 14:43:06 2017 +0200
----------------------------------------------------------------------
.gitignore | 36 +++++++++---------
.travis.yml | 21 ++++++++---
Makefile | 63 --------------------------------
rebar | Bin 196913 -> 0 bytes
rebar.config | 38 ++++++++++++-------
rebar.lock | 1 +
test.config | 21 -----------
test/meck_args_matcher_tests.erl | 2 +-
test/meck_expect_tests.erl | 6 +--
test/meck_history_tests.erl | 4 +-
test/meck_matcher_tests.erl | 4 +-
test/meck_tests.erl | 67 ++++++++++++++++++++++------------
12 files changed, 109 insertions(+), 154 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/0e6c040d/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 238d8e2..b333f4f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,23 +1,21 @@
+.rebar3
+_*
+.eunit
+*.o
*.beam
-*.log
-*.dump
-*.coverdata
-doc/*.html
-doc/*.css
-doc/*.png
-doc/edoc-info
+*.plt
+*.swp
+*.swo
+.erlang.cookie
ebin
-.eunit
-.DS_Store
-tags
-.*.swp
-.settings
-.project
-*.sublime-workspace
-*.sublime-project
-deps/*
+log
+erl_crash.dump
.rebar
-.deps.plt
-
-# Elixir/Hex.pm
+logs
_build
+.idea
+rebar3.crashdump
+doc/*.html
+doc/edoc-info
+doc/erlang.png
+doc/stylesheet.css
http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/0e6c040d/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index bad449c..9bb19bf 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,7 @@
language: erlang
-notifications:
- email:
- - hello@alind.io
+
+sudo: false
+os: linux
otp_release:
- 20.0
- 19.3
@@ -9,6 +9,17 @@ otp_release:
- 17.5
- R16B03-1
- R15B03
-before_script: "make get-deps"
-script: "make test"
+script: rebar3 eunit
+install:
+ - wget https://s3.amazonaws.com/rebar3/rebar3 && chmod +x rebar3
+script:
+ - ./rebar3 as prod compile
+ # - ./rebar3 as check xref
+ # - ./rebar3 as check dialyzer
+ - ./rebar3 eunit
+ - ./rebar3 edoc
+
+notifications:
+ recipients:
+ - hello@alind.io
http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/0e6c040d/Makefile
----------------------------------------------------------------------
diff --git a/Makefile b/Makefile
deleted file mode 100644
index 8ec5837..0000000
--- a/Makefile
+++ /dev/null
@@ -1,63 +0,0 @@
-PLTFILE=$(CURDIR)/.deps.plt
-APP_DEPS=kernel stdlib eunit tools compiler erts
-ERLFLAGS= -pa $(CURDIR)/.eunit -pa $(CURDIR)/ebin -pa $(CURDIR)/deps/*/ebin
-
-REBAR="./rebar"
-ifeq ($(REBAR),)
-$(error "Rebar not available on this system")
-endif
-
-ERL = $(shell which erl)
-ifeq ($(ERL),)
-$(error "Erlang must be available on this system")
-endif
-
-BUILD_PLT_INC=$(shell test -d deps && echo '-r deps')
-DIALYZER_INC=$(shell test -d include && echo '-I include') $(shell test -d deps && echo '-I deps')
-
-.PHONY: all rebuild compile doc clean test dialyzer typer get-deps clean-deps \
- shell clean-plt clean-doc distclean
-
-all: get-deps compile
-
-rebuild: distclean get-deps all
-
-get-deps:
- @$(REBAR) -C test.config get-deps
-
-compile:
- @$(REBAR) -C rebar.config skip_deps=true compile
-
-doc:
- @$(REBAR) -C test.config skip_deps=true doc
-
-clean:
- @$(REBAR) -C test.config skip_deps=true clean
-
-test: get-deps compile
- @$(REBAR) -C test.config compile
- @$(REBAR) -C test.config skip_deps=true eunit
-
-$(PLTFILE):
- - dialyzer --build_plt --apps $(APP_DEPS) $(BUILD_PLT_INC) --output_plt $(PLTFILE)
-
-dialyzer: compile $(PLTFILE)
- @dialyzer --fullpath --plt $(PLTFILE) $(DIALYZER_INC) -pa $(CURDIR)/ebin -c src --src | \
- fgrep -v -f ./dialyzer.ignore-warnings
-
-typer:
- typer --plt $(PLTFILE) $(DIALYZER_INC) -r src
-
-shell:
- @$(ERL) $(ERLFLAGS)
-
-clean-plt:
- @rm -rf $(PLTFILE)
-
-clean-doc:
- @cd doc; ls * | grep -v overview.edoc | xargs rm -f
-
-clean-deps:
- @rm -rvf $(CURDIR)/deps/*
-
-distclean: clean clean-plt clean-doc clean-deps
http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/0e6c040d/rebar
----------------------------------------------------------------------
diff --git a/rebar b/rebar
deleted file mode 100755
index e1bddea..0000000
Binary files a/rebar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/0e6c040d/rebar.config
----------------------------------------------------------------------
diff --git a/rebar.config b/rebar.config
index 694cc01..80582f2 100644
--- a/rebar.config
+++ b/rebar.config
@@ -1,16 +1,28 @@
-%% Compiler Options ===========================================================
{erl_opts, [
- %% Erlang releases after 17 don't put R in front of their name, and also require dict() to be written like dict:dict()
- {platform_define, "^R", non_namespaced_types}, % used by meck
- {platform_define, "^[0-9]+", namespaced_types}, % used by hamcrest
- warn_export_all,
- warn_export_vars,
- warn_shadow_vars,
- warn_obsolete_guard,
- warn_unused_import,
- warnings_as_errors,
- debug_info
+ % Erlang releases after 17 don't put R in front of their name, and also
+ % require dict() to be written like dict:dict()
+ {platform_define, "^R", non_namespaced_types}, % used by meck
+ {platform_define, "^[0-9]+", namespaced_types} % used by hamcrest
]}.
-%% Misc =======================================================================
-{clean_files, [".eunit", "ebin/*.beam", "test/*.beam"]}.
+{profiles, [
+ {test, [
+ {erl_opts, [
+ debug_info,
+ {platform_define, "^R(?!16B03)", cover_empty_compile_opts}
+ ]},
+ {cover_enabled, true},
+ {cover_opts, [verbose]}
+ ]},
+ {compile, [
+ {erl_opts, [
+ debug_info,
+ warnings_as_errors,
+ warn_export_all,
+ warn_export_vars,
+ warn_shadow_vars,
+ warn_obsolete_guard,
+ warn_unused_import
+ ]}
+ ]}
+]}.
http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/0e6c040d/rebar.lock
----------------------------------------------------------------------
diff --git a/rebar.lock b/rebar.lock
new file mode 100644
index 0000000..57afcca
--- /dev/null
+++ b/rebar.lock
@@ -0,0 +1 @@
+[].
http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/0e6c040d/test.config
----------------------------------------------------------------------
diff --git a/test.config b/test.config
deleted file mode 100644
index ade907f..0000000
--- a/test.config
+++ /dev/null
@@ -1,21 +0,0 @@
-%% Dependencies ===============================================================
-{deps,
- [{hamcrest, ".*", {git, "https://github.com/hyperthunk/hamcrest-erlang.git",
- {branch, "master"}}}]}.
-
-%% Compiler Options ===========================================================
-{erl_opts, [
- %% Erlang releases after 17 don't put R in front of their name, and also require dict() to be written like dict:dict()
- {platform_define, "^R", non_namespaced_types}, % used by meck
- {platform_define, "^[0-9]+", namespaced_types}, % used by hamcrest
- {platform_define, "^R(?!16B03)", cover_empty_compile_opts},
- warnings_as_errors,
- debug_info
-]}.
-
-%% Eunit Options ==============================================================
-{cover_enabled, true}.
-{cover_print_enabled, true}.
-
-%% Misc =======================================================================
-{clean_files, [".eunit", "ebin/*.beam", "test/*.beam"]}.
http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/0e6c040d/test/meck_args_matcher_tests.erl
----------------------------------------------------------------------
diff --git a/test/meck_args_matcher_tests.erl b/test/meck_args_matcher_tests.erl
index 0b943c9..44f3860 100644
--- a/test/meck_args_matcher_tests.erl
+++ b/test/meck_args_matcher_tests.erl
@@ -44,7 +44,7 @@ from_empty_args_test() ->
?assertMatch(false, meck_args_matcher:match([1, 2, 3], ArgsMatcher)).
matcher_featured_test() ->
- ArgsSpec = [meck:is(hamcrest_matchers:equal_to(1)),
+ ArgsSpec = [meck:is(fun(X) -> X == 1 end),
2,
meck:is(fun(X) -> X == 3 end),
{4, [5, '_'], <<"7">>}],
http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/0e6c040d/test/meck_expect_tests.erl
----------------------------------------------------------------------
diff --git a/test/meck_expect_tests.erl b/test/meck_expect_tests.erl
index a18bf39..08b17f3 100644
--- a/test/meck_expect_tests.erl
+++ b/test/meck_expect_tests.erl
@@ -56,7 +56,7 @@ expect_wildcard_test() ->
expect_matchers_test() ->
%% Given
Is1003 = meck_matcher:new(fun(X) -> X == 1003 end),
- LessThen1004 = meck_matcher:new(hamcrest_matchers:less_than(1004)),
+ LessThen1004 = meck_matcher:new(fun(X) -> X < 1004 end),
%% When
E = meck_expect:new(blah, [Is1003, LessThen1004], 2001),
%% Then
@@ -69,7 +69,7 @@ expect_matchers_test() ->
expect_with_matchers_multiclause_test() ->
%% Given
Is1003 = meck_matcher:new(fun(X) -> X == 1003 end),
- LessThen1004 = meck_matcher:new(hamcrest_matchers:less_than(1004)),
+ LessThen1004 = meck_matcher:new(fun(X) -> X < 1004 end),
%% When
E = meck_expect:new(blah, [{['_', Is1003, 1004], 2001},
{['_', Is1003, LessThen1004], 2002},
@@ -90,7 +90,7 @@ expect_with_matchers_multiclause_test() ->
expect_with_matchers_masked_clause_test() ->
%% Given
Is1003 = meck_matcher:new(fun(X) -> X == 1003 end),
- LessThen1004 = meck_matcher:new(hamcrest_matchers:less_than(1004)),
+ LessThen1004 = meck_matcher:new(fun(X) -> X < 1004 end),
%% When
E = meck_expect:new(blah, [{[Is1003, LessThen1004], 2001},
{[Is1003, Is1003], 2002}]),
http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/0e6c040d/test/meck_history_tests.erl
----------------------------------------------------------------------
diff --git a/test/meck_history_tests.erl b/test/meck_history_tests.erl
index 7da0419..d8d6a98 100644
--- a/test/meck_history_tests.erl
+++ b/test/meck_history_tests.erl
@@ -78,7 +78,7 @@ capture_different_args_specs_test() ->
?assertMatch(2003, meck:capture(first, test, foo, 3, 2)),
?assertMatch(2005, meck:capture(first, test, foo, ['_', '_'], 2)),
?assertMatch(2006, meck:capture(first, test, foo, [1006, '_', '_'], 2)),
- ?assertMatch(2008, meck:capture(first, test, foo, ['_', '_', meck:is(hamcrest_matchers:greater_than(3006))], 2)),
+ ?assertMatch(2008, meck:capture(first, test, foo, ['_', '_', meck:is(fun(X) -> X > 3006 end)], 2)),
%% Clean
meck:unload().
@@ -126,7 +126,7 @@ result_different_args_specs_test() ->
?assertMatch(2003, meck_history:result(first, '_', test, foo, 3)),
?assertMatch(2005, meck_history:result(first, '_', test, foo, ['_', '_'])),
?assertMatch(2006, meck_history:result(first, '_', test, foo, [1006, '_', '_'])),
- Matcher = meck:is(hamcrest_matchers:greater_than(3006)),
+ Matcher = meck:is(fun(X) -> X > 3006 end),
?assertMatch(2008, meck_history:result(first, '_', test, foo, ['_', '_', Matcher])),
%% Clean
meck:unload().
http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/0e6c040d/test/meck_matcher_tests.erl
----------------------------------------------------------------------
diff --git a/test/meck_matcher_tests.erl b/test/meck_matcher_tests.erl
index 543aee9..013903c 100644
--- a/test/meck_matcher_tests.erl
+++ b/test/meck_matcher_tests.erl
@@ -28,7 +28,7 @@ match_predicate_not_bool_test() ->
?assertMatch(false, meck_matcher:match_ignore(1001, Matcher)).
match_hamcrest_test() ->
- Matcher = meck_matcher:new(hamcrest_matchers:equal_to(1000)),
+ Matcher = meck_matcher:new(fun(X) -> X == 1000 end),
?assertMatch(true, meck_matcher:match_ignore(1000, Matcher)),
?assertMatch(false, meck_matcher:match_ignore(1001, Matcher)).
@@ -43,6 +43,4 @@ predicate_wrong_arity_test() ->
is_matcher_test() ->
?assertMatch(true, meck_matcher:is_matcher(meck_matcher:new(fun(X) -> X == 1000 end))),
?assertMatch(false, meck_matcher:is_matcher(fun(X) -> X == 1000 end)),
- ?assertMatch(true, meck_matcher:is_matcher(meck_matcher:new(hamcrest_matchers:equal_to(1000)))),
- ?assertMatch(false, meck_matcher:is_matcher(hamcrest_matchers:equal_to(1000))),
?assertMatch(false, meck_matcher:is_matcher(blah)).
http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/0e6c040d/test/meck_tests.erl
----------------------------------------------------------------------
diff --git a/test/meck_tests.erl b/test/meck_tests.erl
index a3be47d..1801a1b 100644
--- a/test/meck_tests.erl
+++ b/test/meck_tests.erl
@@ -17,7 +17,6 @@
-module(meck_tests).
-include_lib("eunit/include/eunit.hrl").
--include_lib("hamcrest/include/hamcrest.hrl").
-define(assertTerminated(MonitorRef, Reason, Timeout),
(fun() ->
@@ -459,8 +458,8 @@ called_few_args_matchers_(Mod) ->
Args = [one, 2, {three, 3}, "four"],
ok = meck:expect(Mod, test, length(Args), ok),
ok = apply(Mod, test, Args),
- assert_called(Mod, test, ['_', meck:is(equal_to(2)), {'_', 3}, "four"], true),
- assert_called(Mod, test, ['_', meck:is(equal_to(3)), {'_', 3}, "four"], false),
+ assert_called(Mod, test, ['_', meck:is(fun(X) -> X == 2 end), {'_', 3}, "four"], true),
+ assert_called(Mod, test, ['_', meck:is(fun(X) -> X == 3 end), {'_', 3}, "four"], false),
ok.
called_false_error_(Mod) ->
@@ -777,7 +776,7 @@ expect_args_pattern_invalid_(Mod) ->
expect_args_matchers_(Mod) ->
%% When
meck:expect(Mod, f, [{[1, meck:is(fun(X) -> X == 1 end)], a},
- {[1, meck:is(less_than(3))], b},
+ {[1, meck:is(fun(X) -> X < 3 end)], b},
{['_', '_'], c}]),
%% Then
?assertEqual(a, Mod:f(1, 1)),
@@ -951,7 +950,7 @@ stub_all_overridden_by_passthrough_test() ->
mock_file_existing_test() ->
%% Given
- ExistingFile = atom_to_list(?MODULE) ++ ".erl",
+ ExistingFile = test_file(?MODULE, ".erl"),
{ok, ExistsInfo} = file:read_file_info(ExistingFile),
meck:new(file, [unstick, passthrough]),
%% When
@@ -974,7 +973,7 @@ mock_file_missing_test() ->
meck:unload(file).
cover_test() ->
- {ok, _} = cover:compile("../test/meck_test_module.erl"),
+ {ok, _} = cover:compile(test_file(meck_test_module, ".erl")),
a = meck_test_module:a(),
b = meck_test_module:b(),
{1, 2} = meck_test_module:c(1, 2),
@@ -992,14 +991,14 @@ compile_options_setup() ->
Module = cover_test_module,
% Our test module won't compile without compiler options that
% rebar won't give it, thus the rename dance.
- Src = join("../test/", Module, ".erl"),
- ok = file:rename(join("../test/", Module, ".dontcompile"), Src),
+ Src = test_file(Module, ".erl"),
+ ok = file:rename(test_file(Module, ".dontcompile"), Src),
OldPath = code:get_path(),
- code:add_path("../test"),
+ code:add_path(test_dir()),
{OldPath, Src, Module}.
compile_options_teardown({OldPath, Src, Module}) ->
- file:rename(Src, join("../test/", Module, ".dontcompile")),
+ file:rename(Src, test_file(Module, ".dontcompile")),
code:purge(Module),
code:delete(Module),
code:set_path(OldPath).
@@ -1008,10 +1007,10 @@ cover_options_({_OldPath, Src, Module}) ->
% Test that compilation options (include paths and preprocessor
% definitions) are used when un-mecking previously cover compiled
% modules.
- CompilerOptions = [{i, "../test/include"}, {d, 'TEST', true}],
+ CompilerOptions = [{i, test_include()}, {d, 'TEST', true}],
% The option recover feature depends on having the BEAM file
% available.
- {ok, _} = compile:file(Src, [{outdir, "../test"}|CompilerOptions]),
+ {ok, _} = compile:file(Src, [{outdir, test_dir()}|CompilerOptions]),
{ok, _} = cover:compile(Src, CompilerOptions),
a = Module:a(),
b = Module:b(),
@@ -1026,7 +1025,10 @@ cover_options_({_OldPath, Src, Module}) ->
-ifdef(cover_empty_compile_opts).
-define(compile_options, []).
-else.
--define(compile_options, [{i,"../test/include"},{d,'TEST',true}]).
+-define(compile_options, [
+ {i, test_include()},
+ {d, 'TEST', true}
+]).
-endif.
cover_options_fail_({_OldPath, Src, Module}) ->
%% This may look like the test above but there is a subtle
@@ -1034,8 +1036,12 @@ cover_options_fail_({_OldPath, Src, Module}) ->
%% compile options. This test verifies that function `b/0', which
%% relies on the `TEST' directive being set can still be called
%% after the module is meck'ed.
- CompilerOptions = [{i, "../test/include"}, {d, 'TEST', true},
- {outdir, "../test"}, debug_info],
+ CompilerOptions = [
+ debug_info,
+ {i, test_include()},
+ {outdir, test_dir()},
+ {d, 'TEST', true}
+ ],
{ok, _} = compile:file(Src, CompilerOptions),
?assertEqual(
proplists:delete(outdir, lists:sort(CompilerOptions)),
@@ -1056,7 +1062,12 @@ cover_options_fail_({_OldPath, Src, Module}) ->
%% Verify passthru calls went to cover
?assertEqual({ok, {Module, 4}}, cover:analyze(Module, calls, module)).
-join(Path, Module, Ext) -> filename:join(Path, atom_to_list(Module) ++ Ext).
+test_file(Module, Ext) ->
+ filename:join(test_dir(), atom_to_list(Module) ++ Ext).
+
+test_dir() -> filename:dirname(?FILE).
+
+test_include() -> filename:join(test_dir(), "include").
run_mock_no_cover_file(Module) ->
ok = meck:new(Module),
@@ -1068,14 +1079,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/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/meck_test_module.erl"),
?assertEqual({ok, {meck_test_module, {0,3}}},
cover:analyze(meck_test_module, module)),
passthrough_test([]),
@@ -1083,7 +1094,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/meck_test_module.erl"),
?assertEqual({ok, {meck_test_module, {0,3}}},
cover:analyze(meck_test_module, module)),
ok = meck:new(meck_test_module, [passthrough]),
@@ -1109,8 +1120,10 @@ unload_when_crashed_test() ->
Pid = whereis(SaltedName),
?assertEqual(true, is_pid(Pid)),
unlink(Pid),
+ error_logger:tty(false),
exit(Pid, expected_test_exit),
timer:sleep(100),
+ error_logger:tty(true),
?assertEqual(undefined, whereis(SaltedName)),
?assertEqual(false, code:is_loaded(mymod)).
@@ -1246,7 +1259,7 @@ remote_setup() ->
Myself = list_to_atom("meck_eunit_test@" ++ Hostname),
net_kernel:start([Myself, shortnames]),
{ok, Node} = slave:start_link(list_to_atom(Hostname), meck_remote_test,
- "-pa test"),
+ "-pa \"" ++ test_dir() ++ "\""),
{Mod, Bin, File} = code:get_object_code(meck),
true = rpc:call(Node, code, add_path, [filename:dirname(File)]),
{module, Mod} = rpc:call(Node, code, load_binary, [Mod, File, Bin]),
@@ -1264,7 +1277,7 @@ remote_meck_({Node, Mod}) ->
?assertEqual(true, rpc:call(Node, Mod, test, [])).
remote_meck_cover_({Node, Mod}) ->
- {ok, Mod} = cover:compile(Mod),
+ {ok, Mod} = cover:compile(test_file(Mod, ".erl")),
{ok, _Nodes} = cover:start([Node]),
?assertEqual(ok, rpc:call(Node, meck, new, [Mod])).
@@ -1320,7 +1333,9 @@ can_mock_sticky_module_not_yet_loaded_({Mod, _}) ->
?assert(code:is_sticky(Mod)).
cannot_mock_sticky_module_without_unstick_({Mod, _}) ->
- ?assertError(module_is_sticky, meck:new(Mod, [no_link])).
+ error_logger:tty(false),
+ ?assertError(module_is_sticky, meck:new(Mod, [no_link])),
+ error_logger:tty(true).
can_mock_non_sticky_module_test() ->
?assertNot(code:is_sticky(meck_test_module)),
@@ -1424,6 +1439,7 @@ wait_timeout_test() ->
meck:unload().
wait_for_the_same_pattern_on_different_processes_test() ->
+ error_logger:tty(false),
%% Given
meck:new(test, [non_strict]),
meck:expect(test, foo, 2, ok),
@@ -1447,9 +1463,11 @@ wait_for_the_same_pattern_on_different_processes_test() ->
?assertTerminated(MonitorRef1, normal, 300),
?assertTerminated(MonitorRef2, {timeout, _}, 300),
%% Clean
- meck:unload().
+ meck:unload(),
+ error_logger:tty(true).
wait_for_different_patterns_on_different_processes_test() ->
+ error_logger:tty(false),
%% Given
meck:new(test, [non_strict]),
meck:expect(test, foo, 1, ok),
@@ -1476,7 +1494,8 @@ wait_for_different_patterns_on_different_processes_test() ->
?assertTerminated(MonitorRef1, {timeout, _}, 300),
?assertTerminated(MonitorRef2, normal, 300),
%% Clean
- meck:unload().
+ meck:unload(),
+ error_logger:tty(true).
wait_purge_expired_tracker_test() ->
%% Given