Permalink
Browse files

Capture output during r.m.stacktrace test.

  • Loading branch information...
1 parent 440d140 commit e1a79eb17f091a79a924e8cb66f6b1b692ce6f26 @mmcgrana committed Oct 27, 2010
Showing with 7 additions and 6 deletions.
  1. +7 −6 ring-devel/test/ring/middleware/stacktrace_test.clj
@@ -8,9 +8,10 @@
(def js-req {:headers {"accept" "text/javascript"}})
(deftest wrap-stacktrace-smoke
- (let [{:keys [status headers] :as response} (app html-req)]
- (is (= 500 status))
- (is (= {"Content-Type" "text/html"} headers)))
- (let [{:keys [status headers]} (app js-req)]
- (is (= 500 status))
- (is (= {"Content-Type" "text/javascript"} headers))))
+ (binding [*err* (java.io.StringWriter.)]
+ (let [{:keys [status headers] :as response} (app html-req)]
+ (is (= 500 status))
+ (is (= {"Content-Type" "text/html"} headers)))
+ (let [{:keys [status headers]} (app js-req)]
+ (is (= 500 status))
+ (is (= {"Content-Type" "text/javascript"} headers)))))

0 comments on commit e1a79eb

Please sign in to comment.