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

assert-calledcljmacro

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

assert-called*clj

(assert-called* msg expected-fn actual-fn spy-fn args)
source

assert-called-argscljmacro

(assert-called-args msg form)
source

assert-called-ncljmacro

(assert-called-n msg form)
source

assert-called-oncecljmacro

(assert-called-once msg form)
source

resolve-spy-fnclj

(resolve-spy-fn expr)
source

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

× close