Skip to content

Commit 83e15cb

Browse files
committed
Fix broken classpath test
1 parent 5801074 commit 83e15cb

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

cider-classpath.el

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
"List all classpath entries."
9090
(interactive)
9191
(cider-ensure-connected)
92+
(cider-ensure-op-supported "classpath")
9293
(with-current-buffer (cider-popup-buffer cider-classpath-buffer t)
9394
(cider-classpath-list (current-buffer)
9495
(mapcar (lambda (name)

test/cider-classpath-tests.el

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
(require 'ert)
2+
(require 'noflet)
3+
(require 'cider)
4+
(require 'cider-classpath)
5+
6+
(ert-deftest cider-classpath-not-connected ()
7+
(noflet ((cider-connected-p () nil))
8+
(should-error (cider-classpath) :type 'user-error)))
9+
10+
(ert-deftest cider-classpath-unsupported-op ()
11+
(noflet ((cider-ensure-op-supported (op) nil))
12+
(should-error (cider-classpath) :type 'user-error)))

test/cider-tests.el

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -748,10 +748,6 @@
748748
(noflet ((cider-connected-p () nil))
749749
(should-error (cider-refresh) :type 'user-error)))
750750

751-
(ert-deftest cider-classpath-not-connected ()
752-
(noflet ((cider-connected-p () nil))
753-
(should-error (cider-classpath) :type 'user-error)))
754-
755751
(ert-deftest cider-quit-not-connected ()
756752
(noflet ((cider-connected-p () nil))
757753
(should-error (cider-quit) :type 'user-error)))

0 commit comments

Comments
 (0)