This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-02-07
Channels
- # announcements (35)
- # beginners (80)
- # boot (1)
- # calva (4)
- # cider (33)
- # cljdoc (40)
- # clojars (3)
- # clojure (95)
- # clojure-berlin (2)
- # clojure-europe (4)
- # clojure-italy (28)
- # clojure-nl (2)
- # clojure-seattle (1)
- # clojure-serbia (1)
- # clojure-spec (74)
- # clojure-uk (71)
- # clojurescript (29)
- # core-async (1)
- # cursive (80)
- # data-science (4)
- # datomic (17)
- # duct (75)
- # emacs (4)
- # figwheel-main (5)
- # fulcro (3)
- # jackdaw (1)
- # java (1)
- # jobs-discuss (20)
- # off-topic (32)
- # parinfer (2)
- # pathom (23)
- # re-frame (26)
- # reagent (25)
- # rum (6)
- # shadow-cljs (122)
- # speculative (4)
- # sql (17)
- # testing (7)
- # yada (8)
I’m using clojure.test on a project now after using Midje for a long time. And I miss provided
greatly (https://github.com/marick/Midje/wiki/Describing-one-checkable's-prerequisites). If you use clojure.test, what do you use with it to test that the function under test calls another function with certain arguments?
@ljosa I'd be somewhat inclined to consider that a smell in unit testing, to be honest.
But, if you must, you can use with-redefs
to provide a redefinition of the function that saves its arguments to a local atom
or something similar...
Which is nature's way of saying "Perhaps you shouldn't be doing this?" 🙂
Not much, no 🙂 I use Expectations and it has a side-effects
function which does this and I think I've used it just once. Maybe twice. In 22,000 lines of Clojure test code at work.