John,

I was looking around at your tests just to get a feel for using the test-is
stuff in the contrib library.  I noticed that when I ran main.clj it would
run
not only the tests in clj-record, but all of the tests in the
clojure.contrib
as well.  I was curious so I attempted to figure out what was going on
and what to do to only run the tests in clj-record.test.*.

I changed the end of the clj-record/test/main.clj script to this:

main.clj >>>>
(def files ["core-test" "validation-test" "associations-test"])

(doseq [file files]
   (load file))

(def base-ns (re-find #"^\w*.*\." (str *ns*)))

(apply test-is/run-tests (map #(symbol (str base-ns %)) files))
main.clj <<<<

I also had to change the ns function in the associations-test.clj file
to match the name of the file.   The word 'associations' in the namespace
was just misspelled.

On Wed, Dec 31, 2008 at 9:39 AM, John D. Hume <duelin.mark...@gmail.com>wrote:

>
> Hi Brian,
>
> On Tue, Dec 30, 2008 at 11:41 AM, Brian Doyle <brianpdo...@gmail.com>
> wrote:
> > (ns com.example.user)
> >   (clj-record.core/init-model)
> >
> > but when I do that I get the error:
> >
> > java.lang.ClassNotFoundException: clj-record.core
> ...
> > (first (reverse (re-split #"\." (name (ns-name *ns*)))))
> >
> > and could be changed to:
> >
> > (last (re-split #"\." (name (ns-name *ns*))))
>
> Those changes have been incorporated, along with stuff in the README
> about validation.
>
> I'm confused as to how I ended up with (first (reverse ...)) since I
> remember looking at the doc for (last seq), but anyway, it's there
> now.
>
> -hume.
> --
> http://elhumidor.blogspot.com/
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to