Skip to content

Instantly share code, notes, and snippets.

@quux00
Created September 3, 2012 01:51
Show Gist options
  • Save quux00/3606159 to your computer and use it in GitHub Desktop.
Save quux00/3606159 to your computer and use it in GitHub Desktop.
(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