Liking cljdoc? Tell your friends :D

spy.test

Implements the clojure.test/assert-expr multimethod for all spy predicates, allowing for rich error reporting without having to wrap clojure.test/is.

Example usage:

(def f (spy/spy))

(f "foo" "bar")

;; succeeds! (is (spy/called-with? f "foo" "bar")

;; fails with: ;; FAIL in () (form-init541289308750557841.clj:234) ;; expected: ("baz") ;; actual: [("foo" "bar")] (is (spy/called-with? f "baz"))

Implements the `clojure.test/assert-expr` multimethod for all spy predicates,
allowing for rich error reporting without having to wrap `clojure.test/is`.

Example usage:

(def f (spy/spy))

(f "foo" "bar")

;; succeeds!
(is (spy/called-with? f "foo" "bar")

;; fails with:
;; FAIL in () (form-init541289308750557841.clj:234)
;; expected: ("baz")
;;   actual: [("foo" "bar")]
(is (spy/called-with? f "baz"))
raw docstring

actual-call-matchingclj/s

(actual-call-matching calls)
source

actual-called-n-timesclj/s

(actual-called-n-times calls)
source

actual-called-onceclj/s

(actual-called-once calls)
source

actual-called-with-argsclj/s

(actual-called-with-args calls)
source

actual-not-calledclj/s

(actual-not-called calls)
source

assert-call-matchingcljmacro

(assert-call-matching msg form report-fn)
source

assert-calledcljmacro

(assert-called msg form report-fn expected-fn actual-fn)
source

assert-called-n-timescljmacro

(assert-called-n-times msg form report-fn)
source

assert-called-oncecljmacro

(assert-called-once msg form report-fn)
source

assert-called-with-argscljmacro

(assert-called-with-args msg form report-fn)
source

assert-not-calledcljmacro

(assert-not-called msg form report-fn)
source

expected-call-matchingclj/s

(expected-call-matching form)
source

expected-called-n-timesclj/s

(expected-called-n-times n)
source

expected-called-onceclj/s

(expected-called-once)
source

expected-called-with-argsclj/s

(expected-called-with-args & args)
source

expected-not-calledclj/s

(expected-not-called)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close