If someone wants the Midje arrow syntax without Midje, I have a small macro that seams doing it.
(defn test-and-expect [[expr arrow & args]]
(cond (= arrow '=>) [`(clojure.test/is (= ~expr ~(first args)))
(rest args)]))
(defmacro protocol [& args]
(loop [lines []
more-args args]
(if (empty? more-args) lines
(let [[test still-more-args] (test-and-expect more-args)]
(recur (conj lines test)
still-more-args)))))
(protocol (inc 4) => 5
(dec 4) => 5
(+ 2 3) => 5)
; => [true false true]
I know, it is not popular, and it has downsides. I don't want to advertise it. But I still like it. I imagine it as something like a test protocol.oh hell yeah
i thought about adding something liek this to #lazytest for the experimental midje syntax support, so this would be very nice