Hi,
yes, better than my solution. :) Wrapping the with-bindings around
the run-tests I can drop the namespace switch.
(with-bindings {#'clojure.contrib.mock/report-problem #'my-report-
problem}
(run-tests))
The only issue left is that when running the test with leiningen
("lein test") I don't have control of the run-tests call.
Oh, I just tried this one:
(with-bindings {#'clojure.contrib.mock/report-problem #'my-report-
problem}
(deftest test-sqrtf
(expect [apf (times 2 (returns (apf 5)))] (sqrtf 5)))
(run-tests) )
which works too. So I can simply wrap all my deftest's inside the with-
binding which also works when running the tests with "lein
test" (removing the run-tests to avoid running the test twice).
Thanks!
--
Martin
--
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
To unsubscribe from this group, send email to
clojure+unsubscribegooglegroups.com or reply to this email with the words
"REMOVE ME" as the subject.