【发布时间】:2018-06-08 07:47:13
【问题描述】:
我想知道如何在测试时禁用 Elixir 的登录。在我当前的代码中,我测试记录器消息,所以我不想完全禁用它,而是隐藏消息直到任何测试停止通过。
我正在使用 mix 和 ExUnit 来管理和测试我的项目。
mix test
Compiling 2 files (.ex)
.........
17:59:18.446 [warn] Code seems to be empty
.
17:59:18.447 [warn] Code doesn't contain HLT opcode
.
17:59:18.448 [warn] Code doesn't contain HLT opcode
17:59:18.448 [error] Label error doesn't exist
.....
Finished in 0.07 seconds
16 tests, 0 failures
【问题讨论】: