GitXplorerGitXplorer
j

vim-testrunner

public
1 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
e86c824846b028c603590c11159de5bbd5aa5e08

Make sure to use bin/rake

jjvanbaarsen committed 10 years ago
Unverified
d809b30bf2813d0bfd53a7fca1c9c40ce7f009a2

Run rake via bundler

jjvanbaarsen committed 11 years ago
Unverified
ced180dd4a926f3c93929d6e6b10ed758fd3bc22

Reactive macvim after running

jjvanbaarsen committed 11 years ago
Unverified
604021308968eb44e652c81f1be8ee80eabe3122

Check of we are in rails and use rake test

jjvanbaarsen committed 11 years ago
Unverified
e780dd55bfd59dbccff4300657f640831fc76c97

Fixed runLastTest

jjvanbaarsen committed 11 years ago
Unverified
3dc605853649ff357fe150e18de9fe4aa7d141b6

Dont reactivate MacVim

jjvanbaarsen committed 11 years ago

README

The README file for this repository.

vim-testrunner

This is a lightweight RSpec runner for Vim and MacVim.

Installation

Recommended installation with vundle:

Bundle 'jvanbaarsen/vim-testrunner'

If using zsh on OS X it may be necessary to move /etc/zshenv to /etc/zshrc.

Configuration

Key mappings

Add your preferred key mappings to your .vimrc file.

" RSpec.vim mappings
map <Leader>t :call RunCurrentSpecFile()<CR>
map <Leader>s :call RunNearestSpec()<CR>
map <Leader>l :call RunLastSpec()<CR>

Custom command

Overwrite the g:test_command variable to execute a custom command.

Example:

let g:test_command = "!rspec --drb {test}"

This g:test_command variable can be used to support any number of test runners or pre-loaders. For example, to use Dispatch:

let g:test_command = "Dispatch rspec {test}"

Or, Dispatch and Zeus together:

let g:test_command = "compiler rspec | set makeprg=zeus | Make rspec {test}"

Custom runners

Overwrite the g:test_runner variable to set a custom launch script. At the moment there are two MacVim-specific runners, i.e. os_x_terminal and os_x_iterm. The default is os_x_terminal, but you can set this to anything you want, provided you include the appropriate script inside the plugin's bin/ directory.

iTerm instead of Terminal

If you use iTerm, you can set g:test_runner to use the included iterm launching script. This will run the specs in the last session of the current terminal.

let g:test_runner = "os_x_iterm"

Credits

A super big thank you goes out to Thoughbot for creating the rspec.vim plugin, which i used as the base for this plugin.