Closed tolitius closed 8 years ago
While this works fine:
(mount/start-with {#'app.sms/send-sms #'test.app/send-sms})
it requires #'test.app/send-sms to be created, which could make it hard to narrow down the scope for the test (to a let binding).
#'test.app/send-sms
Have start-with to take instances instead [(!) breaking, but worth it] / as an addition to [might not worth it]:
start-with
instead
an addition to
(let [sms-ch (chan) send-sms (fn [sms] (go (>! sms-ch sms)))] (mount/start-with {#'app.sms/send-sms send-sms}) ;; testing.. and (mount/stop))
in 0.1.9-SNAPSHOT
0.1.9-SNAPSHOT
While this works fine:
it requires
#'test.app/send-sms
to be created, which could make it hard to narrow down the scope for the test (to a let binding).Have
start-with
to take instancesinstead
[(!) breaking, but worth it] / asan addition to
[might not worth it]: