|
710 | 710 | (should (string= (cider-refcard-url) "https://github.com/clojure-emacs/cider/raw/v0.11.0/doc/cider-refcard.pdf")))
|
711 | 711 | (let ((cider-version "0.11.0-snapshot"))
|
712 | 712 | (should (string= (cider-refcard-url) "https://github.com/clojure-emacs/cider/raw/master/doc/cider-refcard.pdf"))))
|
| 713 | + |
| 714 | +(ert-deftest cider-ensure-connected () |
| 715 | + (noflet ((cider-connected-p () t)) |
| 716 | + (should-not (cider-ensure-connected))) |
| 717 | + (noflet ((cider-connected-p () nil)) |
| 718 | + (should-error (cider-ensure-connected) :type 'user-error))) |
| 719 | + |
| 720 | +(ert-deftest cider-ensure-op-supported () |
| 721 | + (noflet ((cider-nrepl-op-supported-p (op) t)) |
| 722 | + (should-not (cider-ensure-op-supported "foo"))) |
| 723 | + (noflet ((cider-nrepl-op-supported-p (op) nil)) |
| 724 | + (should-error (cider-ensure-op-supported "foo") :type 'user-error))) |
| 725 | + |
| 726 | +(ert-deftest cider-refresh-not-connected () |
| 727 | + (noflet ((cider-connected-p () nil)) |
| 728 | + (should-error (cider-refresh) :type 'user-error))) |
| 729 | + |
| 730 | +(ert-deftest cider-classpath-not-connected () |
| 731 | + (noflet ((cider-connected-p () nil)) |
| 732 | + (should-error (cider-classpath) :type 'user-error))) |
| 733 | + |
| 734 | +(ert-deftest cider-quit-not-connected () |
| 735 | + (noflet ((cider-connected-p () nil)) |
| 736 | + (should-error (cider-quit) :type 'user-error))) |
| 737 | + |
| 738 | +(ert-deftest cider-restart-not-connected () |
| 739 | + (noflet ((cider-connected-p () nil)) |
| 740 | + (should-error (cider-restart) :type 'user-error))) |
| 741 | + |
| 742 | +(ert-deftest cider-find-ns-not-connected () |
| 743 | + (noflet ((cider-connected-p () nil)) |
| 744 | + (should-error (cider-find-ns) :type 'user-error))) |
| 745 | + |
| 746 | +(ert-deftest cider-find-ns-unsupported-op () |
| 747 | + (noflet ((cider-ensure-op-supported (op) nil)) |
| 748 | + (should-error (cider-find-ns) :type 'user-error))) |
0 commit comments