Fork me on GitHub
#cider
<
2018-09-12
>
wusticality10:09:37

Hey folks, I’m getting some weird behavior when executing unit tests in cider. I’m in the namespace of a unit test. I add a test that is designed to fail, load the namespace, run all tests in the namespace (which causes the unit test to fail), then delete the test, rinse and repeat. The test that I deleted is still being executed (and failing) even though I reloaded the namespace. What am I doing wrong? Thanks in advance!

vemv10:09:53

loading a buffer again in a barebones fashion won't unload outdated functions. I'd have a look into https://github.com/clojure-emacs/cider/blob/master/doc/miscellaneous_features.md#code-reloading instead

benedek13:09:05

yup this is a repl thing not really a cider thing.

benedek13:09:17

there is an undef command in cider tho

benedek13:09:26

if you type , in the repl and select undef and then the name of the test you want to get rid of also does the trick

ballpark20:09:36

Just upgraded to 0.18.0, and not sure if this is related, but C-c M-n isn't switching the namespace in my repl. Any ideas?

tanzoniteblack21:09:09

C-c M-n n now sets the repl to the namespace of the file in focus

tanzoniteblack21:09:25

(there's a whole host of namespace related calls now under the C-c M-n umbrella)

bozhidar21:09:54

I think we changed the keybinding only in cider-mode, but not in cider-repl-mode (aka the REPL).

tanzoniteblack21:09:01

cider-repl-set-ns	C-c M-n (M-)n	Switch the namespace of the REPL buffer to the namespace of the current buffer.

tanzoniteblack21:09:20

So it's not out of date, we were just looking at the wrong doc

ballpark21:09:01

I see. Thanks!