Ruby Single Test : Runs a single Ruby test under the cursor
script karma |
Rating 0/0,
Downloaded by 1046 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
Doug McInnes |
|
script type |
utility |
|
description |
When a ruby test file with your cursor within a test block, hit
<leader>.
(that's <leader><period>) and that test, and only that test, will run in quickfix.
That's it!
Supports Test::Unit, Rspec and Minitest. If run on an Rspec describe block it will run all the tests in that block (just using existing spec command-line functionality for that one).
The script is also hosted on GitHub:
http://github.com/dmcinnes/ruby_single_test |
|
install details |
Just drop the script in your .vim/plugins folder.
If you use Vundle install with ":BundleInstall dmcinnes/ruby_single_test"
If you're having problems using rspec, be sure the makeprg is set to your spec executable. To test this type:
:echo &makeprg
While in an rspec file. It should output "spec".
For more information read Vim's documentation on makeprg (:h makeprg).
The Specky! plugin adds lots of goodness that makes working with rspecs nice, like filetype detection and syntax highlighting:
http://www.vim.org/scripts/script.php?script_id=2286
To remap the command, to <leader>t for instance, add something like this to your .vimrc:
nmap <silent> <leader>t <Plug>ExecuteRubyTest
Ruby Single Test defaults to using make! (with the bang). To disable this behavior drop this in your .vimrc:
let g:ruby_single_test_no_bang = 1 |
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 18.220.154.82
|