2

(facts ...) form in Midje, let's us group a bunch of (fact ..) forms and also have more (facts ..) form under it.

When writing corresponding test suite in clojure.test, what should be used to replace, (facts ...) ? Is there something else in clojure with similar semantics ?

Amogh Talpallikar
  • 12,084
  • 13
  • 79
  • 135

1 Answers1

2

You can use testing to group your tests. Paraphrased example from the linked doc page:

(deftest arithmetic
  (testing "with positive integers"
    (is (= 4 (+ 2 2)))
    (is (= 7 (+ 3 4))))
  (testing "with negative integers"
    (is (= -4 (+ -2 -2)))
    (is (= -1 (+ 3 -4)))))
Piotrek Bzdyl
  • 12,965
  • 1
  • 31
  • 49