 -------------------------
 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?))
-                            [:foo])))))
-  (testing "set ifn / ret failure"
-    (is (= "-- Function spec failed -----------
+             (until-unsuccessful (s/explain-str (s/coll-of (s/fspec :args (s/cat :x int?) :ret int?))
+                                                [:foo])))))
+    (testing "set ifn / ret failure"
+      (is (= "-- Function spec failed -----------
 
   [#{}]
    ^^^

   (< (:ret %) (-> % :args :x)))"
                  :cljs "(fn [%] (< (:ret %) (-> % :args :x)))"))
           (binding [s/*explain-out* (expound/custom-printer {:print-specs? false})]
             (s/explain-str (s/coll-of :fspec-fn-test/minus) [my-minus]))))))

(deftest ifn-fspec-test
  (testing "keyword ifn / ret failure"

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