Created
February 9, 2017 14:38
Run rspec on file in emacs (depends on rake.el and projectile)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun coder/rspec-file () | |
"Run rspec on the current file and set as the compile target, | |
if we have zeus available than run it via zeus otherwise run it | |
via bundle exec rspec" | |
(interactive) | |
(projectile-with-default-dir (projectile-project-root) | |
(let ((command-prefix (rake--choose-command-prefix (projectile-project-root) (list :zeus "zeus test " | |
:bundler "bundle exec rspec ")))) | |
(compile (concat command-prefix (coder/project-relative-current-file-path)))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment