I say this too many times on this list, but I'll say it again. The best way to test defn- functions is to never use defn- in the first place. Instead move implementation functions into an internal namespace that way they can be accessed if needed, but are out of the way of the public api. It also makes it easier for your users to tap into the core of your library/application if needed. Trust your users to make good decisions, make everything public, separate via namespaces.
For an example of this see: http://github.com/clojure/core.async Timothy On Thu, Jun 12, 2014 at 7:53 AM, mynomoto <mynom...@gmail.com> wrote: > You can use a macro. Look how on > http://nakkaya.com/2009/11/18/unit-testing-in-clojure/ > > > On Thursday, June 12, 2014 5:44:21 AM UTC-3, Hussein B. wrote: >> >> Hi, >> >> I like to use (defn-) when it comes to internal implementation functions. >> But since they aren't exposed, how to unit test them? >> >> Of course, I'm using Lein and clojure.test >> >> Thanks. >> > -- > 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 unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- “One of the main causes of the fall of the Roman Empire was that–lacking zero–they had no way to indicate successful termination of their C programs.” (Robert Firth) -- 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 unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.