我正在测试一个使用其他命名空间中的其他两个函数的函数。
(fact "a test"
(let [result (function-that-uses-functions-from-other-namespace)]
result => truthy))
我想从其他命名空间中提取函数,并且在编写测试时遇到问题。
(fact "a test"
(let [result (function-that-uses-functions-from-other-namespace)]
(function-that-uses-functions-from-other-namespace)
(provided (other-namespace/function1 "parameter") => "stub_response"))
但这种方法似乎不起作用。有什么提示吗?是否只是在使用在 let 子句中提供的 midje 中建议的可检查之前评估let 的情况不存根方法