|
365 | 365 | (expect (cider-repls) :to-have-same-items-as (list l1 l2)))))))))
|
366 | 366 |
|
367 | 367 | (describe "killed buffers"
|
368 |
| - (it "do not show up in it" |
| 368 | + (it "do not show up in it |
| 369 | +" |
369 | 370 | (let ((default-directory (expand-file-name "/tmp/some-dir")))
|
370 | 371 | (cider-test-with-buffers
|
371 | 372 | (a b)
|
|
398 | 399 | (append cider-connection-capabilities '(cljs))))
|
399 | 400 |
|
400 | 401 | (expect (cider-repls) :to-equal (list a b))
|
401 |
| - (sesman-unregister 'CIDER session))))))) |
| 402 | + (sesman-unregister 'CIDER session)))))) |
| 403 | + |
| 404 | + (describe "when ops-to-support is not nil" |
| 405 | + :var (nrepl-ops) |
| 406 | + (it "only returns the repls that support the given ops" |
| 407 | + (let ((proj-dir (expand-file-name "/tmp/proj-dir"))) |
| 408 | + (let ((default-directory proj-dir)) |
| 409 | + (with-repl-buffer ses-name 'clj b1 |
| 410 | + (setq nrepl-ops (nrepl-dict "refresh" 't)) |
| 411 | + (with-repl-buffer ses-name 'clj b2 |
| 412 | + (with-repl-buffer ses-name 'cljs b3 |
| 413 | + (expect (cider-repls nil nil '("refresh")) :to-equal (list b1)))))))) |
| 414 | + (it "raises a user error when ensure is not nil and no repl that supports the ops exist" |
| 415 | + (let ((proj-dir (expand-file-name "/tmp/proj-dir"))) |
| 416 | + (let ((default-directory proj-dir)) |
| 417 | + (with-repl-buffer ses-name 'clj b1 |
| 418 | + (with-repl-buffer ses-name 'cljs b2 |
| 419 | + (expect (cider-repls nil 't '("refresh")) :to-throw 'user-error)))))))) |
| 420 | + |
402 | 421 |
|
403 | 422 | (describe "cider--connection-info"
|
404 | 423 | (before-each
|
|
525 | 544 | :project-dir "/Users/me/myproject"
|
526 | 545 | :repl-type cider-connection-tests-dummy-function))
|
527 | 546 | :to-equal "*cider-repl me/myproject:localhost:12345(cider-connection-tests-dummy-function)*")))
|
| 547 | + |
| 548 | +(describe "") |
0 commit comments