What I'd like to do is mock a full name-space for the purpose of testing
other functions that use or require the original name-space. Do people have
ideas or best practices for how I can do this?
The problem comes in that I very much prefer doing my uses/requires in the
name space declaration. If I used the require or use functions, I could
wrap them in an if statement. For example, I could do something like:
(ns foo)
(if (not *testing*) (require 'bar) (require 'mock-bar))
But the problem is, I want to do:
(ns foo
(require bar))
instead of having a free-standing require statement. Which makes it hard to
mock out the name space.
So what's the best way to do this?
Brian
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en