Project testing macro properly registeres failures

Without a `deftest` assertions fail but are not registered by the test
runner which makes runners like `lein test` pass in the presence of
failures.
This commit is contained in:
dm3 2011-08-02 14:48:37 +08:00 committed by fogus
parent 632cd45e21
commit eebf43fa83

View file

@ -36,5 +36,7 @@
(.mkdirs (file ~test-project-target))
(~doc-generator ~test-project-src ~test-project-target ~test-metadata)
(let [~'number-of-generated-pages (count (files-in ~test-project-target))]
~@tests)
;; We need to `deftest` in order for test runners (e.g. `lein test`) to pick up failures
(deftest ~(gensym (str project-name "-"))
~@tests))
(delete-file-recursively ~test-project-target true))))