Col*_*tar 6 unit-testing elixir
我试图用Elixir设置一些单元测试但遇到下面这个错误.我究竟做错了什么?
cannot invoke remote function PropertyManager.Database.get/0 inside match
Run Code Online (Sandbox Code Playgroud)
这是我的代码:
property_manager_test.exs
defmodule PropertyManagerTest do
use ExUnit.Case
test "the truth" do
assert 1 + 1 == 2
end
test "get value from db" do
assert PropertyManager.Database.get() = "test this"
end
end
Run Code Online (Sandbox Code Playgroud)
database.ex
defmodule PropertyManager.Database do
def get do
"test this"
end
end
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1365 次 |
| 最近记录: |