From a84d3de7f69f902cef0107035f2cbb9a24029c59 Mon Sep 17 00:00:00 2001 From: Peter Taoussanis Date: Wed, 26 Jun 2013 14:44:27 +0700 Subject: [PATCH] Add `before-run`, `after-run` Expectations fns --- project.clj | 2 +- test/taoensso/nippy/tests/main.clj | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/project.clj b/project.clj index 531258d..39bcec6 100644 --- a/project.clj +++ b/project.clj @@ -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"]]} diff --git a/test/taoensso/nippy/tests/main.clj b/test/taoensso/nippy/tests/main.clj index 08cbf30..4889076 100644 --- a/test/taoensso/nippy/tests/main.clj +++ b/test/taoensso/nippy/tests/main.clj @@ -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"]})