Skip to content

Instantly share code, notes, and snippets.

@tcrayford
Created January 13, 2010 02:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tcrayford/275859 to your computer and use it in GitHub Desktop.
Save tcrayford/275859 to your computer and use it in GitHub Desktop.
(defun my-run-tests ()
(interactive)
(let ((test-buffer (find-buffer-visiting (format "%stest/%s-test.clj"
(locate-dominating-file buffer-file-name "src/")
(file-name-nondirectory (file-name-sans-extension buffer-file-name))))))
(save-buffer)
(with-current-buffer test-buffer
(clojure-test-run-tests))
(sit 1)
(if
(string-match "0 failures" (current-message))
(message (current-message))
(switch-to-buffer test-buffer))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment