diff options
author | Vitalie Spinu <spinuvit@gmail.com> | 2017-07-23 01:56:09 +0200 |
---|---|---|
committer | Bozhidar Batsov <bozhidar.batsov@gmail.com> | 2017-07-25 08:48:00 +0300 |
commit | ea6aa352f7e5b97e00ac2057c2d7579a9e6f411f (patch) | |
tree | b31657d6388b5124499c1393832eed6d74eabc66 /test | |
parent | 4867db8ab3ca9bcae5adea2f41359927fcaf2492 (diff) |
Fix broken evaluation in cljc files with one connection
Diffstat (limited to 'test')
-rw-r--r-- | test/cider-client-tests.el | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/cider-client-tests.el b/test/cider-client-tests.el index 09ca0d06..cf4c9985 100644 --- a/test/cider-client-tests.el +++ b/test/cider-client-tests.el @@ -498,3 +498,20 @@ SYMBOL is locally let-bound to the current buffer." (spy-on 'cider-connected-p :and-return-value nil) (spy-on 'clojure-expected-ns :and-return-value "clojure-expected-ns") (expect (cider-expected-ns "foo") :to-equal "clojure-expected-ns"))) + +(describe "cider-load-file" + (it "works as expected in empty Clojure buffers" + (spy-on 'cider-request:load-file :and-return-value nil) + (with-connection-buffer "clj" b + (with-temp-buffer + (clojure-mode) + (setq buffer-file-name (make-temp-name "tmp.clj")) + (expect (lambda () (cider-load-buffer)) :not :to-throw))))) + +(describe "cider-interactive-eval" + (it "works as expected in empty Clojure buffers" + (spy-on 'cider-nrepl-request:eval :and-return-value nil) + (with-connection-buffer "clj" b + (with-temp-buffer + (clojure-mode) + (expect (lambda () (cider-interactive-eval "(+ 1)")) :not :to-throw))))) |