Created
September 3, 2012 01:53
-
-
Save quux00/3606163 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn one-time-setup [] | |
(println "one time setup")) | |
(defn one-time-teardown [] | |
(println "one time teardown")) | |
(defn once-fixture [f] | |
(one-time-setup) | |
(f) | |
(one-time-teardown)) | |
;; register as a one-time callback | |
(use-fixtures :once once-fixture) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment