Created
December 13, 2011 03:09
-
-
Save CampingScorpion/1470342 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
;; I want to replace this: | |
(defn- unfinished* [names] | |
(let [declarations (for [name names] | |
`(do | |
(defn ~name [& args#] | |
(throw (user-error (str "#'" '~name " has no implementation. It's used as a prerequisite in Midje tests.")))) | |
;; A reliable way of determining if an `unfinished` function | |
;; has since been defined. | |
(alter-meta! (var ~name) assoc :midje/unfinished-fun ~name)))] | |
`(do ~@declarations))) | |
;; with this: | |
(defn- unfinished* [names] | |
(let [declarations (for [name names] | |
;; metadata's a reliable way of determining if an | |
;; `unfinished` function has since been defined. | |
`(defn ^{:midje/unfinished-fun ~name} ~name [& args#] | |
(throw (user-error (str "#'" '~name " has no implementation. It's used as a prerequisite in Midje tests.")))))] | |
`(do ~@declarations))) | |
;; doesn't seem to work. any suggestions? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment