As I was catching up on a few Parens of the Dead episodes this weekend, I was
amused at how Magnar set up his Emacs to run tests whenever the file is saved.
At first I thought it wasn’t for me (I’m one of those who obsessively saves
every few seconds), but I’ve been trying it out lately and it’s starting to grow
on me.
At its core, all you really need is an hook. But I walked the extra yard and
wrote a minor mode for it, so I can easily call M-xtdd-mode to disable it
if it ever gets on my nerves.
I also had to change the cider-test-success-face to something a little less
“screamy”.
Update 21 nov 2015
Made it a global mode, so it’s easy to disable everywhere, and set the initial
value to t.
Test-Driven-Development in CIDER and Emacs
15 Nov 2015, by Artur Malabarba.As I was catching up on a few Parens of the Dead episodes this weekend, I was amused at how Magnar set up his Emacs to run tests whenever the file is saved. At first I thought it wasn’t for me (I’m one of those who obsessively saves every few seconds), but I’ve been trying it out lately and it’s starting to grow on me.
At its core, all you really need is an hook. But I walked the extra yard and wrote a minor mode for it, so I can easily call M-x
tdd-mode
to disable it if it ever gets on my nerves.I also had to change the
cider-test-success-face
to something a little less “screamy”.Update 21 nov 2015
Made it a global mode, so it’s easy to disable everywhere, and set the initial value to
t
.Update 04 mar 2016
Fixed a function call to the new name.
Tags: testing, CIDER, clojure, programming, init.el, emacs,
Update on tdd-mode with CIDER »
« New Clojure lib: lazy-map
Related Posts
What tests you shouldn’t write: an essay on negative tests in testing
Turbo up your Ruby console in Emacs in programming
A few paredit keys that take over the world in programming
Content © 2019, All rights reserved. Icons under CC3.0.