meck

What's the point of meck:validate?

亡梦爱人 提交于 2019-12-23 15:56:42
问题 As a newcomer to meck, I've been putting together a test that shows the various features. I cannot, however, understand why a developer might call meck:validate. Here's my example: -module(meck_demo). -include_lib("eunit/include/eunit.hrl"). validate_is_of_limited_use_test_() -> { foreach, fun setup_mock/0, fun cleanup_mock/1, [fun validate_does_not_fail_if_a_function_is_not_called/0, fun validate_does_not_fail_if_a_function_is_called_with_wrong_arity/0, fun validate_does_not_fail_if_an