Permalink
Browse files

Use a local instead of a var

  • Loading branch information...
1 parent bbc5e02 commit 1072b773e2715d55eb5a50ff496714bb45a3707f @trptcolin trptcolin committed Feb 28, 2014
Showing with 6 additions and 5 deletions.
  1. +6 −5 src/test/clojure/clojure/tools/nrepl_test.clj
View
11 src/test/clojure/clojure/tools/nrepl_test.clj
@@ -105,11 +105,12 @@
:out))))
(def-repl-test error-on-lazy-seq-with-side-effects
- (let [expression '(defn foo [] (map (fn [x]
- (println x)
- (throw (Exception. "oops")))
- [1 2 3]))
- results (-> (repl-eval session (pr-str (list 'do expression '(foo))))
+ (let [expression '(let [foo (fn [] (map (fn [x]
+ (println x)
+ (throw (Exception. "oops")))
+ [1 2 3]))]
+ (foo))
+ results (-> (repl-eval session (pr-str expression))
combine-responses)]
(is (= "1\n" (:out results)))
(is (re-seq #"oops" (:err results)))))

0 comments on commit 1072b77

Please sign in to comment.