0

我正在尝试这样做:

(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

有人可以帮我弄清楚我做错了什么吗?

4

1 回答 1

0

问题是文件中的这一行project.clj

:jvm-opts ^:replace ["-Dclojure.compiler.direct-linking=true"]
于 2016-06-10T14:44:29.673 回答