Skip to content
Browse files

Added bindings for run all specs and run focused specs

  • Loading branch information...
1 parent ba30479 commit daa72f0c8a53a6f0e767af917440c933a0983488 @patmaddox committed Dec 19, 2008
Showing with 10 additions and 0 deletions.
  1. +10 −0 rspec-mode.el
10 rspec-mode.el
@@ -4,10 +4,20 @@
;;; Pat Maddox
(define-derived-mode rspec-mode ruby-mode "RSpec")
(add-to-list 'auto-mode-alist '("_spec.rb$" . rspec-mode))
(if (functionp 'yas/load-directory)
(yas/load-directory (concat (file-name-directory load-file-name) "snippets")))
+(setq rspec-mode-map
+ (let ((map (make-keymap)))
+ (define-key map (kbd "\C-c s") 'run-specs)
+ (define-key map (kbd "\C-c f") 'run-focused-spec)
+ map))
+(add-hook 'rspec-mode-hook
+ (lambda () (use-local-map rspec-mode-map)))
(defun rails-root (&optional dir)
(or dir (setq dir default-directory))
(if (file-exists-p (concat dir "config/environment.rb"))

0 comments on commit daa72f0

Please sign in to comment.
Something went wrong with that request. Please try again.