diff options
author | Bozhidar Batsov <bozhidar@batsov.com> | 2016-02-28 12:05:17 +0200 |
---|---|---|
committer | Bozhidar Batsov <bozhidar@batsov.com> | 2016-02-28 12:05:17 +0200 |
commit | 83e15cb331f07c6223359417c5773560a3b3ab99 (patch) | |
tree | f9f9dd55f6bafd2370e70c761a671b8a485874a1 | |
parent | 5801074a78e8b20051d800453e9f3676ddbbff5e (diff) |
Fix broken classpath test
-rw-r--r-- | cider-classpath.el | 1 | ||||
-rw-r--r-- | test/cider-classpath-tests.el | 12 | ||||
-rw-r--r-- | test/cider-tests.el | 4 |
3 files changed, 13 insertions, 4 deletions
diff --git a/cider-classpath.el b/cider-classpath.el index c6e16cd0..335edd53 100644 --- a/cider-classpath.el +++ b/cider-classpath.el @@ -89,6 +89,7 @@ "List all classpath entries." (interactive) (cider-ensure-connected) + (cider-ensure-op-supported "classpath") (with-current-buffer (cider-popup-buffer cider-classpath-buffer t) (cider-classpath-list (current-buffer) (mapcar (lambda (name) diff --git a/test/cider-classpath-tests.el b/test/cider-classpath-tests.el new file mode 100644 index 00000000..82542218 --- /dev/null +++ b/test/cider-classpath-tests.el @@ -0,0 +1,12 @@ +(require 'ert) +(require 'noflet) +(require 'cider) +(require 'cider-classpath) + +(ert-deftest cider-classpath-not-connected () + (noflet ((cider-connected-p () nil)) + (should-error (cider-classpath) :type 'user-error))) + +(ert-deftest cider-classpath-unsupported-op () + (noflet ((cider-ensure-op-supported (op) nil)) + (should-error (cider-classpath) :type 'user-error))) diff --git a/test/cider-tests.el b/test/cider-tests.el index d1357b8b..1a75481c 100644 --- a/test/cider-tests.el +++ b/test/cider-tests.el @@ -748,10 +748,6 @@ (noflet ((cider-connected-p () nil)) (should-error (cider-refresh) :type 'user-error))) -(ert-deftest cider-classpath-not-connected () - (noflet ((cider-connected-p () nil)) - (should-error (cider-classpath) :type 'user-error))) - (ert-deftest cider-quit-not-connected () (noflet ((cider-connected-p () nil)) (should-error (cider-quit) :type 'user-error))) |