 
     (it "prints help on startup and exits properly"
       (let [fake-out (java.io.ByteArrayOutputStream.)]
-        (.flush System/out)
         (binding [*out* (java.io.PrintWriter. fake-out)]
           (with-redefs [exit/exit #()]
             (main/launch-nrepl {:attach (str *server-port*)


    (it "allows using doc"
      (let [fake-out (java.io.ByteArrayOutputStream.)]
        (.flush System/out)
        (binding [*out* (java.io.PrintWriter. fake-out)]
          (with-redefs [exit/exit #()]
            (main/launch-nrepl {:attach (str *server-port*)

                                :output-stream fake-out}))
          (should-contain (with-out-str (clojure.repl/doc map))
                          (str fake-out)))))
    )

  (describe "completion"

    (it "tab-completes clojure.core fns"
      (let [fake-out (java.io.ByteArrayOutputStream.)]
        (binding [*out* (java.io.PrintWriter. fake-out)]
          (with-redefs [exit/exit #()]
