Skip to content

Instantly share code, notes, and snippets.

@jtrim
Created May 10, 2018 22:00
Show Gist options
  • Save jtrim/2ca6d21deaa6b4e4ef223796e2252539 to your computer and use it in GitHub Desktop.
Save jtrim/2ca6d21deaa6b4e4ef223796e2252539 to your computer and use it in GitHub Desktop.
(require 'seq)
(defun magit-rspec-run-changed-files ()
(interactive)
(let ((changed-files (seq-filter 'magit-rspec--spec-file-p (mapcar 'car (magit-file-status)))))
(rspec-run-multiple-files changed-files)))
(defun magit-rspec--spec-file-p (filename)
(string-suffix-p "_spec.rb" filename))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment