Permalink
Browse files
Capture output during r.m.stacktrace test.
- Loading branch information...
Showing
with
7 additions
and
6 deletions.
-
+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