Browse files

Switch from :color to :test-color as per Mark's suggestion.

  • Loading branch information...
1 parent 905b093 commit 343568dfe7cc9b840248a303024b2d7c9a59d11b @technomancy technomancy committed May 12, 2011
Showing with 4 additions and 4 deletions.
  1. +1 −1
  2. +3 −3 src/leiningen/hooks/clj_stacktrace_test.clj
@@ -50,7 +50,7 @@ project in.
:dev-dependencies [[clj-stacktrace "0.2.3-SNAPSHOT"]]
:hooks [leiningen.hooks.clj-stacktrace-test]
:repl-options [:caught clj-stacktrace.repl/pst+]
- :clj-stacktrace {:color true}
+ :clj-stacktrace {:test-color true}
The :hooks entry will enable clj-stacktrace to be used by clojure.test
and other things that use the clojure.stacktrace library. The
@@ -2,16 +2,16 @@
(:use [leiningen.compile :only [eval-in-project]]
[robert.hooke :only [add-hook]]))
-(defn- hook-form [form color?]
- (let [pst (if color?
+(defn- hook-form [form project]
+ (let [pst (if (:test-color (:clj-stacktrace project))
`(do (alter-var-root (resolve '~'clojure.stacktrace/print-cause-trace)
(constantly @(resolve '~pst)))
(defn- add-stacktrace-hook [eval-in-project project form & [h s init]]
- (eval-in-project project (hook-form form (:color (:clj-stacktrace project)))
+ (eval-in-project project (hook-form form project)
h s `(do (try (require '~'clj-stacktrace.repl)
(require '~'clojure.stacktrace)
(catch Exception _#))

0 comments on commit 343568d

Please sign in to comment.