Skip to content
Janko Marohnić edited this page Mar 7, 2015 · 7 revisions

Test.vim goes to great lengths to predict what test command you want to run. Firstly, it automatically recognizes the testing framework. Secondly, it inspects your project environment to figure out what command it should run in the shell.

For example, the executable for RSpec (and Cucumber) is chosen as follows:

  1. If .zeus.sock is detected, runs zeus rspec
  2. Otherwise if bin/rspec is detected, runs bin/rspec (that covers Spring)
  3. Otherwise if Gemfile is detected, runs bundle exec rspec
  4. Otherwise runs rspec

If you're using Minitest, check out the dedicated wiki page and prepare to get psyched.

Jasmine and Mocha wrappers automatically detect if you have CoffeeScript files, and add the appropriate options for loading the compiler. Nearest tests also work, test.vim parses your test file and constructs regexes.

Clojure wrapper under the hood uses the excellent Fireplace.vim plugin by Tim Pope. Fireplace.vim already has built-in functionality for running tests, but test.vim adds some features on top like remembering the last test.

Clone this wiki locally