Advertisement
Guest User

Untitled

a guest
Mar 9th, 2018
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (defmulti obj-type ::obj-type)
  2. (defmethod obj-type :a [_]
  3.   ::base-obj)
  4. (defmethod obj-type :b [_]
  5.   ::base-obj)
  6.  
  7. (s/def ::obj (s/multi-spec obj-type ::obj-type))
  8.  
  9. (deftest multi-spec-override
  10.          (is (every? (fn [m] (= :a (::obj-type m))) (gen/generate (s/gen (s/coll-of ::obj :min-count 1)
  11.                                                                          {::obj-type #(gen/return :a)})))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement