Hi folks,
As of clojure-contrib SVN 283, there's a new clojure.contrib.test-is.
This is a pretty major rewrite of the library.  I've tried to
streamline the code and make it easier to plug in custom reporting and
assertion functions.  Unfortunately, this introduces several breaking
changes:

1. "throws" is gone, replaced by a new form:
    (is (thrown? exception-class expression))
The exception is returned for, e.g. testing the error message.

2. "each=" and "all-true" are gone, replaced by the new macro "are",
which works with any predicate:
    (are =
      2 (+ 1 1)
      4 (+ 2 2))

3. "*test-out*" is gone.  Instead, all test results call the "report"
multimethod.  You can rebind "report" to plug in your own code to
handle test results.

I realize this breaks a lot of the tests in clojure.contrib.test-
clojure.  Sorry about that; if I have time I'll go through and fix
those.  In the mean time; I'm happy to hear about what you think, and
any other improvements I could make to the library.  Some things I
have in mind for the next version:

1. More "is" predicates, including regular expressions and "thrown-
with-msg?"

2. Nested test contexts, as in RSpec and some other testing
frameworks.

3. Adding test metadata to vars that are already defined elsewhere.

Peace, joy, and happy testing.

-Stuart Sierra
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to