Function: projectile-test-at-point-ruby-command

projectile-test-at-point-ruby-command is a byte-compiled function defined in projectile.el.

Signature

(projectile-test-at-point-ruby-command TEST-NAME FILE-NAME)

Documentation

Return a command running Ruby's TEST-NAME in FILE-NAME.

Which runner to use is decided by the project type rather than by the buffer, since both dialects are written in the same major mode: an rspec\= project gets rspec -e\=, anything else the Minitest invocation. TEST-NAME and FILE-NAME are shell-quoted, as a test name is arbitrary source text.

Source Code

;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile-test-at-point-ruby-command (test-name file-name)
  "Return a command running Ruby\\='s TEST-NAME in FILE-NAME.

Which runner to use is decided by the project type rather than by the
buffer, since both dialects are written in the same major mode: an
`rspec\\=' project gets `rspec -e\\=', anything else the Minitest
invocation.  TEST-NAME and FILE-NAME are shell-quoted, as a test name is
arbitrary source text."
  (if (memq (projectile-project-type) '(rails-rspec ruby-rspec))
      (format "bundle exec rspec %s -e %s"
              (shell-quote-argument file-name)
              (shell-quote-argument test-name))
    (format "bundle exec ruby -Itest %s -n %s"
            (shell-quote-argument file-name)
            (shell-quote-argument test-name))))