Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defmacro with-private-fns [[ns fns] & tests]
- "Refers private fns from ns and runs tests in context."
- `(let ~(reduce
- #(conj %1 %2 `(ns-resolve '~ns '~%2))
- []
- fns
- )
- ~@tests
- )
- )
- (comment
- ; This macro is used as:
- (with-private-fns [org.foo.bar [fn1 fn2]]
- (deftest test-fn1..)
- (deftest test-fn2..)
- )
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement