title: Howto include clojure.spec'd functions in a test suite
body: <p>Is there anyway to include clojure.spec'd functions in a generalized test suite? I know we can <a href="http://clojure.org/guides/spec#_registry" rel="noreferrer">register specs</a> and directly <a href="http://clojure.org/guides/spec#_spec_ing_functions" rel="noreferrer">spec functions</a>.</p>
  
  <pre><code>(ns foo
    (:require [clojure.spec :as s]
              [clojure.spec.test :as stest]))
  
  (defn average [list-sum list-count]
    (/ list-sum list-count))
  
  (s/fdef average
          :args (s/and (s/cat :list-sum float? :list-count integer?)
                       #(not (zero? (:list-count %))))
          :ret number?)
  </code></pre>
  
  <p>And later, if I want to run generative tests against that spec'd function, I can use <code>stest/check</code>. </p>
  
  <pre><code>=&gt; (stest/check `average)
  ({:spec #object[clojure.spec$fspec_impl$reify__14282 0x68e9f37c "clojure.spec$fspec_impl$reify__14282@68e9f37c"], :clojure.spec.test.check/ret {:result true, :num-tests 1000, :seed 1479587517232}, :sym edgar.core.analysis.lagging/average})
  </code></pre>
  
  <p>But <strong><em>i)</em></strong> is there anyway to include these test runs in my general test suite? I'm thinking of the kind of <code>clojure.test</code> integration that <a href="https://github.com/clojure/test.check#clojuretest-integration" rel="noreferrer">test.check has</a>. The closest thing that I can see <strong><em>ii)</em></strong> is the <code>stest/instrument</code> (see <a href="http://clojure.github.io/clojure/branch-master/clojure.spec-api.html#clojure.spec.test/instrument" rel="noreferrer">here</a>) function. But that seems to just let us turn on checking at the repl. Not quite what I want. Also, <strong><em>iii)</em></strong> are function specs registered? </p>
  
  <pre><code>(defspec foo-test 
           100 
  
           ;; NOT this
           #_(prop/for-all [v ...]
             (= v ...))
  
           ;; but THIS
           (stest/some-unknown-spec-fn foo))
  </code></pre>