     (is (= (+ (.length s) 2)
            (.length (str/collapse-whitespace (str ws1 s ws2)))))))
 
-(deftest collapse-whitespace-test
-  (are [expected actual] (= expected actual)
-    "foo bar baz" (str/collapse-whitespace "foo
-
-bar    	baz")
-    " foo bar baz " (str/collapse-whitespace " foo bar baz ")))
+(defexamples collapse-whitespace-test
+  (str/collapse-whitespace "foo
+
+bar    	baz") "foo bar baz"
+(str/collapse-whitespace " foo bar baz ") " foo bar baz ")
 
 (defspec levenshtein-distance-is-at-least-difference-between-string-lenghts 100
   (prop/for-all [s1 (gen/not-empty gen/string)

  (prop/for-all [s string-ascii]
    (is (not (str/mixed-case? (str/upper-case s))))))

(deftest mixed-case?-test
  (are [expected actual] (= expected actual)
    "FooBar" (str/mixed-case? "FooBar")
    nil (str/mixed-case? "foo")))

(def whitespace
  (gen/fmap #(apply str %)

             [generators :as gen]
             [properties :as prop]]
            [superstring.core :as str]))

(defmacro defexamples [name & examples]
  `(deftest ~name
     (are [actual expected] (= actual expected)
       ~@examples)))

(defspec appending-separator-and-chomping-does-not-alter-length 100
  (prop/for-all [s gen/string
