我正在尝试这样做:
(defn pilot-ready [args] [2])
(defn ready []
(pilot-ready ["hello"]))
(facts
(ready) => [1]
(provided (pilot-ready ["hello"]) => [1]))
(against-background
[(pilot-ready ["hello"]) => [1]]
(fact
(ready) => [1]))这应该做的是存根pilot ready方法,并使其返回1作为参数"hello“
第一个事实失败了,因为:
FAIL at (innkeeper_paths_client_facts.clj:53)
These calls were not made the right number of times:
(pilot-ready ["hello"]) [expected at least once, actually never called]
FAIL at (innkeeper_paths_client_facts.clj:52)
Expected: [1]
Actual: [2]
Diffs: in [0] expected 1, was 2
=> false第二个是:
FAIL at (innkeeper_paths_client_facts.clj:58)
Expected: [1]
Actual: [2]
Diffs: in [0] expected 1, was 2
=> false有人能帮我找出我做错了什么吗?
发布于 2016-06-10 22:44:30
问题出在project.clj文件中的这一行:
:jvm-opts ^:replace ["-Dclojure.compiler.direct-linking=true"]https://stackoverflow.com/questions/37744205
复制相似问题