Skip to content

Instantly share code, notes, and snippets.

@ignacy
Created March 8, 2013 10:25
Show Gist options
  • Select an option

  • Save ignacy/5115560 to your computer and use it in GitHub Desktop.

Select an option

Save ignacy/5115560 to your computer and use it in GitHub Desktop.
(defun run-file-or-spec ()
"If we're in a spec file - run rspec; in other case use quickrun"
(interactive)
(let ((file-name-ending (substring (file-name-nondirectory (buffer-file-name)) -8 nil)))
(if (string= "_spec.rb" file-name-ending)
(rspec-verify)
(quickrun))))
(bind "<f14>" 'run-file-or-spec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment