You could call the mock file B_mock.clj then (require '[B-mock :as B])
Jonathan On Wed, Sep 14, 2011 at 5:19 PM, Brian Hurt <bhur...@gmail.com> wrote: > Say I have two name spaces, A and B, with A depending on B. I want to test > namespace A, replacing module B with a mock B for testing purposes- > preferably without having to load B at all (B sucks in a bunch of stuff, > like dependencies on databases and external web sites and etc. that I don't > want to deal with in testing). What is the easy, clojure-approved, > mechanism for doing this? I tried: > > (ns B) > > ; mock defns > > (ns user) > > (require 'A) > > but this still load the "real" B, and A still calls the "real" B, and not > the mock B. > > Thanks. > > Brian > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en