Skip to content

Instantly share code, notes, and snippets.

Avatar
😀

Gardner Vickers gardnervickers

😀
View GitHub Profile
@jmglov
jmglov / spec_test_utils.clj
Created Sep 14, 2016
Utility functions for using `clojure.spec` generative tests in standard `clojure.test` unit tests.
View spec_test_utils.clj
(ns spec-test-utils
(:require [clojure.spec.test :as stest]
[clojure.test :refer [is testing]]))
(defn- check [function num-tests]
(if num-tests
(stest/check function {:clojure.spec.test.check/opts {:num-tests num-tests}})
(stest/check function)))
(defn checking