Skip to content

Commit

Permalink
Clojure 1.2.1 reveals a bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
marick committed Dec 6, 2012
1 parent f452ac2 commit f4a3756
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/midje/doc.clj
Expand Up @@ -124,7 +124,11 @@
:print-facts (2) -- print fact descriptions in addition to namespaces.
"} midje-print-levels)

(def midje-print-level midje-print-levels)
(defn alternate-doc-source [copy original]
(intern *ns* (vary-meta copy assoc :doc (:doc (meta (resolve original))))))

(alternate-doc-source 'midje-print-level 'midje-print-levels)


(def ^{:doc "
* A common form:
Expand All @@ -143,8 +147,8 @@
(fact :integration ...)
(fact {:priority 5} ...)
"} midje-facts)
(def midje-fact midje-facts)

(alternate-doc-source 'midje-fact 'midje-facts)

(def ^{:doc "
(facts \"about checkers\"
Expand Down Expand Up @@ -224,8 +228,7 @@
...)
"} midje-setup)

(def midje-teardown midje-setup)

(alternate-doc-source 'midje-teardown 'midje-setup)

(def ^{:doc "
* For checks
Expand Down

0 comments on commit f4a3756

Please sign in to comment.