Skip to content

Commit

Permalink
Fixed bug in extend tester that broke the object tester when extendin…
Browse files Browse the repository at this point in the history
…g it.
  • Loading branch information
Licenser committed Apr 22, 2010
1 parent 8e25b0e commit 123d7b4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/net/licenser/sandbox/tester.clj
Expand Up @@ -63,7 +63,7 @@
(:tests %2))) {} definitions)]
(fn
([]
definitions)
[new-tester definitions])
([form nspace]
(let [forms (if (= (type form) clojure.lang.Var) (list form) (fn-seq form))]
(if (empty? forms)
Expand All @@ -86,7 +86,7 @@
(:tests %2))) {} definitions)]
(fn
([]
definitions)
[new-object-tester definitions])
([object method]
(let [method (symbol method)
c (type object)]
Expand All @@ -100,7 +100,8 @@

(defn extend-tester "Extends a tester with more definitions."
[tester & definitions]
(apply new-tester (concat (tester) definitions)))
(let [[tester tester-defs] (tester)]
(apply tester (concat tester-defs definitions))))

(defn combine-testers
[& testers]
Expand Down

0 comments on commit 123d7b4

Please sign in to comment.