(ns app.test.interactive
  (:use [app.interactive]
        [conjure.core]
        [clojure.test]))

(deftest can-quit
  (let [input-command "quit\r"]
    (with-in-str
      input-command
      (interactive []))))

(ns app.test.interactive
  (:use [app.interactive]
        [conjure.core]
        [clojure.test]))

(deftest can-quit
  (let [input-command "quit\r"]
    (with-in-str
      input-command
      (interactive []))))

(deftest list-shows-error-if-no-classes-loaded
  (let [command-sequence ["list" "quit"]
        input-string (clojure.string/join "\r" command-sequence)]
    (with-in-str
      input-string
      (mocking [println print flush]
               (interactive [])
               (verify-call-times-for println 2)
               (verify-first-call-args-for
                 println "No classes loaded. Use <load> first")))))

Test list command shows error when there are not any classes loaded
Test list command shows error when there are not any classes loaded

mshravanreddi/effectivejava,ftomassetti/effectivejava,dushmis/effectivejava,ftomassetti/effectivejava,dushmis/effectivejava,mshravanreddi/effectivejava