Skip to content
This repository
Browse code

A bit 'o documentation

  • Loading branch information...
commit f1476ea00cb8f7c3e38e8cf388ada425caa7ffa5 1 parent 43985f3
Brian Marick authored

Showing 1 changed file with 10 additions and 4 deletions. Show diff stats Hide diff stats

  1. +10 4 src/midje/checking/core.clj
14 src/midje/checking/core.clj
@@ -5,13 +5,17 @@
5 5 ;;; There is a notion of "extended falsehood", in which a false value may be a
6 6 ;;; map containing information about what went wrong.
7 7
8   -(defn as-data-laden-falsehood [value]
9   - (vary-meta value assoc :midje/data-laden-falsehood true))
10   -
11 8 (defn data-laden-falsehood? [value]
12 9 (:midje/data-laden-falsehood (meta value)))
13 10
14   -(defn data-laden-falsehood-to-map [value]
  11 +(defn as-data-laden-falsehood [value]
  12 + (vary-meta value assoc :midje/data-laden-falsehood true))
  13 +
  14 +(defn data-laden-falsehood-to-map
  15 + "Used for testing Midje itself, this prevents a Midje
  16 + example of the expected creation of a data-laden falsehood
  17 + from being interpreted as a failure."
  18 + [value]
15 19 (with-meta value {}))
16 20
17 21 (defn extended-false? [value]
@@ -22,6 +26,8 @@
22 26 (not (extended-false? value)))
23 27
24 28 (defn user-friendly-falsehood [value]
  29 + "'downcast' a possible data-laden falsehood into
  30 + `false` if necessary."
25 31 (if (data-laden-falsehood? value)
26 32 false
27 33 value))

0 comments on commit f1476ea

Please sign in to comment.
Something went wrong with that request. Please try again.