0

是否可以在 eunit 测试中设置被测代码中使用的环境变量?这失败了**error:undef

example_test() ->
  application:set_env(an_app, example_key, "value").

编辑:

没有太多可以显示的错误,但这里是完整的堆栈:

    env_request_handler_tests: a_test_ (example_test)...*failed*
in function application:set_env/3
  called as set_env(an_app,example_key,"value")
in call from env_request_handler_tests:'-a_test_/0-fun-2-'/1 (include/test_fixture.hrl, line 13)
**error:undef
4

0 回答 0