我为我的 Elixir 项目编写了一些测试并将它们放在test/
目录中。现在我运行mix test
,我得到:
$ mix test
Test patterns did not match any file:
就是这样,之后就什么都没有了。我是否必须手动设置测试路径?快速的谷歌搜索没有发现任何东西。
这是我所有测试的样子:
# project_dir/test/my_app/some_module.exs
defmodule MyApp.SomeModule.Test do
use ExUnit.Case
doctest MyApp.SomeModule
test "method 1" do
assert MyApp.SomeModule.method_1_works?
end
test "method 2" do
assert MyApp.SomeModule.method_2_works?
end
end