Closed emiln closed 10 years ago
Something like this:
(defmacro expect-command
[string command]
`(let [channel# (clojure.core.async/chan)
network# {:to-network channel#}]
(expect
~string
(do (~(first command) network# ~@(rest command))
(clojure.core.async/<!! channel#)))))
This was closed by the was that was fd1bc03d22ddcc9f8560f09d7837655ad1497952.
All command tests in the
clojirc.commands-test
namespace repeats a bunch of code. I am not usually a big fan of macros for tests, but I think it is warranted here.could become something like