should-exception-matches

circumspec.should

  • (should-exception-matches expected-message throwable message)

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 circumspec/should.clj:89 top

(defn should-exception-matches
  [expected-message throwable message]
  (if expected-message
    (let [actual (.getMessage throwable)]
      (if ((match-fn expected-message) expected-message actual)
        true
        (fail (merge (message-map message) {:expected expected-message :actual actual}))))
    true))
Vars in circumspec.should/should-exception-matches: defn let merge
Used in 0 other vars

Comments top

No comments for should-exception-matches. Log in to add a comment.