Code Monkey home page Code Monkey logo

mutant.el's Introduction

mutant.el

An interface for the Mutant testing tool


MELPA

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.

Installation

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)

Usage

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.

Customization

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")

Changelog

1.0 - First release.

Function Documentation

(mutant-check-file &optional FILE-NAME)

Run Mutant over a single file. If none is given, then buffer-file-name is used.

(mutant-check-from-dired)

Run Mutant over all marked files in dired. If there are no files marked, use that under cursor.

(mutant-check-custom &optional MATCH-EXP)

Run Mutant over MATCH-EXP. When called without argument, prompt user.


Markdown README file generated by make-readme-markdown.el

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.