![]() | TDD |
|
02 Dec 2008, 05:24
Phil Hagelberg (5 posts) |
I’m really enjoying the book and am working on a toy project as I progress. But one of the things I find most disorienting is working without a test suite. I know FP makes manual testing in the Repl easier, but repeatable tests are very important too. I know there’s not much coverage of external libraries in the book, but I think it would help immensely if there were a mention of how to write a test suite. I’ve been looking at the “fact” library1 that’s bundled with Compojure, and while I only have brief experience with it, it looks pretty promising so far. There’s some test stuff in clojure-contrib too that might be better too; I haven’t looked at it. Regardless I think the topic deserves some coverage. |
|
02 Dec 2008, 13:08
Stuart Halloway (76 posts) |
Hi Phil, The next beta release will include unit tests for all sample code. There won’t be any prose to describe it until Beta 5, but at least you can have a look around. Cheers, |
|
02 Dec 2008, 14:12
Stephen Viles (2 posts) |
Phil, you may like the unit test framework for Clojure written by Shane Celis. It is a xUnit framework in the same vein as JUnit. See http://gnufoo.org/clojure/unit-test/README.html |
|
03 Dec 2008, 17:42
Phil Hagelberg (5 posts) |
Thanks for the info. Stuart: are you using the library Stephen recommended, or something else? |
|
03 Dec 2008, 20:01
Stuart Halloway (76 posts) |
Phil, I am using clojure.contrib.test-is, to minimize dependencies for the book. |
| You must be logged in to comment |

