Created
August 18, 2012 11:08
-
-
Save firesofmay/3386131 to your computer and use it in GitHub Desktop.
Saving test output to a string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(def msg (let [s (java.io.StringWriter.)] | |
(binding [*test-out* s] | |
(with-test-out (run-tests))) | |
(str s))) | |
;Thanks to jjcomer at #clojure IRC. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment