      ((string-match "\\(.+\\)s$" word) (match-string 1 word))
      (t (error (concat "Can't singularize " word))))))
 
-(defun rails-test--pluralize (word)
+(defun dm-guard--pluralize (word)
   "Pluralize WORD very stupidly."
   (save-match-data
     (cond


;;; Code:

(defun rails-test--singularize (word)
  "Singularize WORD very stupidly."
  (save-match-data
    (cond

  '(rails-rspec ruby-rspec rails-test ruby-test)
  "Known project types for dm-guard.")

(defvar dm-guard-enabled
  t
  "Global variable that can disable dm-guard.")

(defun dm-guard-global-toggle ()
  "Globally toggle dm-guard runners."
  (interactive)
  (setq dm-guard-enabled (not dm-guard-enabled))
  (message (if dm-guard-enabled "Enabled" "Disabled")))

(defun dm-guard-test ()
  "Use tmux to execute a rails test."
  (interactive)
  (if (and dm-guard-enabled (projectile-project-p))
      (let* ((project-type (projectile-project-type))
             (spec-mode (or (eq project-type 'rails-rspec) (eq project-type 'ruby-rspec)))
             (test-cmd (cond
