 -------------------------
 Detected 1 error\n"
               (binding [s/*explain-out* (expound/custom-printer {:print-specs? false})]
-                (s/explain-str (s/coll-of (s/fspec :args (s/cat :x int?) :ret int?))
-                               [[]])))))))
+                (until-unsuccessful (s/explain-str (s/coll-of (s/fspec :args (s/cat :x int?) :ret int?))
+                                                   [[]]))))))))


-------------------------
Detected 1 error\n")
           (expound/expound-str (s/coll-of :fspec-test/div) [my-div])))))

(s/def :fspec-ret-test/my-int pos-int?)
(s/def :fspec-ret-test/plus (s/fspec

(defn my-div [x y]
  (assert (not (zero? (/ x y)))))

(defmacro until-unsuccessful [form]
  `(let [nil-or-failure# #(if (= "Success!\n" %)
                            nil
                            %)]
     (or (nil-or-failure# ~form)
         (nil-or-failure# ~form)
         (nil-or-failure# ~form)
         (nil-or-failure# ~form)
         (nil-or-failure# ~form))
     )

 

  )

(deftest fspec-exception-test
  (testing "args that throw exception"
    (is (= (pf "-- Exception ----------------------
