Created
January 5, 2011 02:40
-
-
Save jhirn/765844 to your computer and use it in GitHub Desktop.
This patch worked for me.
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
diff --git a/rspec-mode.el b/rspec-mode.el | |
index 22caf94..57fe566 100644 | |
--- a/rspec-mode.el | |
+++ b/rspec-mode.el | |
@@ -356,7 +356,10 @@ | |
(if rspec-use-rvm | |
(rvm-activate-corresponding-ruby)) | |
(rspec-register-verify-redo (cons 'rspec-run opts)) | |
- (compile (mapconcat 'identity (list (rspec-runner) (rspec-spec-directory (rspec-project-root)) (rspec-runner-options opts)) " ")) | |
+ (let ((curdir (file-name-as-directory default-directory))) | |
+ (setq default-directory (rspec-project-root)) | |
+ (compile (mapconcat 'identity (list (rspec-runner) (rspec-spec-directory (rspec-project-root)) (rspec-runner-options opts)) " ")) | |
+ (setq default-directory curdir)) | |
(end-of-buffer-other-window 0)) | |
(defun rspec-run-single-file (spec-file &rest opts) | |
@@ -364,7 +367,10 @@ | |
(if rspec-use-rvm | |
(rvm-activate-corresponding-ruby)) | |
(rspec-register-verify-redo (cons 'rspec-run-single-file (cons spec-file opts))) | |
- (compile (mapconcat 'identity (list (rspec-runner) (rspec-runner-target spec-file) (rspec-runner-options opts)) " ")) | |
+ (let ((curdir (file-name-as-directory default-directory))) | |
+ (setq default-directory (rspec-project-root)) | |
+ (compile (mapconcat 'identity (list (rspec-runner) (rspec-runner-target spec-file) (rspec-runner-options opts)) " ")) | |
+ (setq default-directory curdir)) | |
(end-of-buffer-other-window 0)) | |
(defun rspec-project-root (&optional directory) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment