Created
September 3, 2012 01:51
-
-
Save quux00/3606159 to your computer and use it in GitHub Desktop.
This file contains hidden or 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) | |
(println (type f)) | |
(f) | |
(one-time-teardown)) | |
(defn setup [] | |
(println "setup")) | |
(defn teardown [] | |
(println "teardown")) | |
(defn each-fixture [f] | |
(setup) | |
(println (type f)) | |
(f) | |
(teardown)) | |
(use-fixtures :once once-fixture) | |
(use-fixtures :each each-fixture) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment