如何使测试待定

时间:2015-01-22 06:56:34

标签: testing clojure speclj

我正在尝试在clojure sepclj中进行测试。

该文档建议在特征中添加pending。它应该如何添加?

以下方法不会产生预期的行为:

(it :pending "should ...")
(it "should ..." :pending)
(pending (it "should ..."))

由于

1 个答案:

答案 0 :(得分:3)

让我们从简单的规范开始:

(describe "truthiness"
  (it "tests if my-fn returns true"
    (should (my-fn))))

使(it "tests if my-fn returns true" ...)特征待定:

(describe "truthiness"
  (it "tests if my-fn returns true"
    (pending "my-fn should be revisited") ; If message is not specified "Not Yet Implemented" will be used instead
    (should (my-fn))))