Search code examples
testingclojurespeclj

How to make a test pending


I am trying to make tests pending in clojure sepclj.

The doc suggest to add pending to the characteristics. How is it supposed to be added ?

The following approaches do not produce the expected behavior:

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

Thanks


Solution

  • Let's start from simple spec:

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

    To make (it "tests if my-fn returns true" ...) characteristic pending:

    (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))))