Closed tcrayford closed 6 years ago
I like checking the name and bindings; I'm less sure about the non-empty body.
It's similar to the fact that the prop/for-all
macro forces you to have an expression in the body ((prop/for-all [x gen-int])
is a compile error), which leads me to type :STUB
an awful lot. Most of the rest of the clojure ecosystem isn't like this.
A funny middle-ground would be to have the macro insert a failing assertion if your body is empty :).
I'm down with removing that check. I'll push a commit here later.
ping @tcrayford, I'd really like this to be merged :)
hey this could be done more robustly with clojure.spec now
because the clojure.test integration uses varargs in a macro, it's pretty easy to forget an argument and get a weird error message out like this:
<CompilerException java.lang.IllegalArgumentException: Don't know how to create ISeq from: clojure.lang.Symbol, compiling:(yeller/unit/deploys_test.clj:27:3)>
Better to just assert on the arguments and spit out detailed errors.