From 1327019fdb115bc19abb081233cb33fc64c73ccc Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Tue, 29 Oct 2024 10:45:08 -0400 Subject: [PATCH] Add rspec-dired-verify-marked for dired mode testing Implemented `rspec-dired-verify-marked` function to run RSpec on files marked in dired mode. Bound the new function to the key "C-c , m" in `rspec-dired-mode-map`. This allows for batch testing of selected files within the dired interface, streamlining the testing process for multiple files. --- emacs/.emacs.d/config/init-ruby.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/emacs/.emacs.d/config/init-ruby.el b/emacs/.emacs.d/config/init-ruby.el index 306eac9..2efa2a0 100644 --- a/emacs/.emacs.d/config/init-ruby.el +++ b/emacs/.emacs.d/config/init-ruby.el @@ -60,9 +60,13 @@ "Runs RSpec on all related specs for the Ruby files changed between the current branch and TARGET-BRANCH." (interactive) (rspec--run-verify-changed t)) + (defun rspec-dired-verify-marked () + (interactive) + (rspec-run-multiple-files (dired-get-marked-files) (rspec-core-options))) :general (rspec-mode-map "C-c , g" #'rspec-verify-changed "C-c , G" #'rspec-verify-changed-related) + (rspec-dired-mode-map "C-c , m" #'rspec-dired-verify-marked) (rspec-verifiable-mode-map "C-c , g" #'rspec-verify-changed "C-c , G" #'rspec-verify-changed-related) :custom