Created
February 9, 2017 14:38
-
-
Save sideshowcoder/66677f6268e6f5a65260c5a631da76ab to your computer and use it in GitHub Desktop.
Run rspec on file in emacs (depends on rake.el and projectile)
This file contains 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