1.2.0 permalink Arrow_down_16x16
  • (returns val)
  • (returns val expectation-hash)
Creates or associates to an existing expectation hash the :returns key with
a value to be returned by the expectation after a successful invocation
matching its expected arguments (if applicable).
Usage:
(returns ret-value expectation-hash?)

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/contrib/mock.clj:205 top

(defn returns
  "Creates or associates to an existing expectation hash the :returns key with
a value to be returned by the expectation after a successful invocation
matching its expected arguments (if applicable).
Usage:
(returns ret-value expectation-hash?)"

  ([val] (returns val {}))
  ([val expectation-hash] (assoc expectation-hash :returns val)))
Vars in clojure.contrib.mock/returns: assoc defn val
Used in 0 other vars

Comments top

No comments for returns. Log in to add a comment.