;>> >> deftest is a macro. Macros are expanded at compile time. So, in this
> >>> >> case, at compile time, a function called namespace2 is def'd with meta
> >>> >> data :test set to the body of your deftest.
>
> >>> >> All of that body is namespac
thing)))
On Aug 15, 1:42 pm, Alan Malloy wrote:
> On Aug 15, 6:16 am, Richard Rattigan wrote:
>
>
>
>
>
>
>
>
>
> > I don't understand why this test would fail - can anyone explain why?
>
> > (ns learn.clojure.test.core
> > (:use [
Okay, that makes sense - although it does seem potentially confusing.
Thanks!
On Aug 15, 1:42 pm, Alan Malloy wrote:
> On Aug 15, 6:16 am, Richard Rattigan wrote:
>
>
>
>
>
>
>
>
>
> > I don't understand why this test would fail - can anyone expla
I don't understand why this test would fail - can anyone explain why?
(ns learn.clojure.test.core
(:use [clojure.test]))
(deftest namespaces
(in-ns 'my.new.namespace)
(is (= "my.new.namespace" (str *ns*)))
(is (= `anything 'my.new.namespace/anything)))
expected: (= (quote learn.clojure.te