Add before-run, after-run Expectations fns

This commit is contained in:
Peter Taoussanis 2013-06-26 14:44:27 +07:00
parent 823dd94d71
commit a84d3de7f6
2 changed files with 4 additions and 1 deletions

View file

@ -4,7 +4,7 @@
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.4.0"]
[expectations "1.4.43"]
[expectations "1.4.48"]
[org.iq80.snappy/snappy "0.3"]]
:profiles {:1.4 {:dependencies [[org.clojure/clojure "1.4.0"]]}
:1.5 {:dependencies [[org.clojure/clojure "1.5.1"]]}

View file

@ -6,6 +6,9 @@
;; Remove stuff from stress-data that breaks roundtrip equality
(def test-data (dissoc nippy/stress-data :bytes))
(defn- before-run {:expectations-options :before-run} [])
(defn- after-run {:expectations-options :after-run} [])
(expect test-data ((comp thaw freeze) test-data))
(expect test-data ((comp thaw #(freeze % {:legacy-mode true})) test-data))
(expect test-data ((comp #(thaw % {:password [:salted "p"]})