Created
December 24, 2011 20:44
-
-
Save CampingScorpion/1518307 to your computer and use it in GitHub Desktop.
nested fact descriptions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (facts "about mathematics" | |
| (fact "addition is commutative" | |
| (+ 1 2) => 3 | |
| (+ 2 1) => 4) ;; FAIL | |
| (fact "multiplication is commutative" | |
| (* 2 5) => 10 | |
| (* 5 2) => 11)) ;; FAIL | |
| ;; These would report as: | |
| ;; FAIL: "about mathematics, addition is commutative" at (core.clj:995) | |
| ;; ... | |
| ;; FAIL: "about mathematics, multiplication is commutative" at (core.clj:999) | |
| ;; ... |
Author
CampingScorpion
commented
Dec 26, 2011
via email
Currently no way to configure formatters. But sounds very doable. I'd
love to see an issue on github, showing exactly how it might work, ... how
do you configure which format? How does each format lool, etc etc etc
…On Dec 25, 2011 10:54 PM, "Ben Mabey" < ***@***.***> wrote:
BTW, is midje setup to add different formatters (for reports)? It used to
ride on top of `clojure.test` but with `lein-midje` I suspect it now has
its own reporting functionality. Anyways, the reason why I bring it up is
because rspec has a number of formatters and one of them the "nested"
formatter which is really nice for tests like this. (It basically prints
the tests out in similar intentation as they appear in the file.)
---
Reply to this email directly or view it on GitHub:
https://gist.github.com/1518307
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment