Skip to content

Instantly share code, notes, and snippets.

@arr-ee
Created March 31, 2014 13:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arr-ee/9892004 to your computer and use it in GitHub Desktop.
Save arr-ee/9892004 to your computer and use it in GitHub Desktop.
(defmacro defdyntest
[test-meta test-name & test-body]
`(let [fn# (deftest ~test-name ~@test-body)]
(alter-meta! fn# merge ~test-meta)
fn#))
(let [tname (symbol 'test-1)]
(defdyntest {} tname (println 1)))
; => #'user/tname
;; this should be #'user/test-1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment