An interface for the Mutant testing tool
This package provides an interface for dealing with the
Mutant testing tool, enabling
one to easily launch it from a .rb file or even from a dired buffer.
The generated output is nicely formatted and provides direct links
to the errors reported by the mutations. I've tried
to mimic the rspec-mode overall experience as much as possible.
This package can be installed via MELPA, or manually by downloading
mutant.el and adding it to your init file, as it follows:
(add-to-list 'load-path "/path/to/mutant")
(require 'mutant)For having mutant-mode enabled automatically, I suggest you
to do the following:
(add-hook 'ruby-mode-hook 'mutant-mode)By default, the following keybindings will be available:
- C-c . f runs
mutant-check-file - C-c . c runs
mutant-check-custom
For dired mode integration, just add the following to your
configuration file:
(add-hook 'dired-mode-hook 'mutant-dired-mode)By doing so, you'll be able to mark files and then press C-c . f
for running mutant on them.
See the Function Documentation for more details.
If you're a rvm user, you might have to add the following to your
configuration file:
(add-hook 'mutant-precompile-hook
(lambda () (rvm-activate-corresponding-ruby)))Notice that this obviously requires rvm.el to be installed.
In order to execute the mutant command with a bundle exec prefix,
simply add the following to your configuration file:
(setq mutant-cmd-base "bundle exec mutant")1.0 - First release.
Run Mutant over a single file.
If none is given, then buffer-file-name is used.
Run Mutant over all marked files in dired. If there are no files marked, use that under cursor.
Run Mutant over MATCH-EXP. When called without argument, prompt user.