[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: [ANN] rubytest.vim 0.9.0

Mike Mondragon

4/19/2009 11:13:00 PM

On Sun, Apr 19, 2009 at 2:44 AM, Jan <jan.h.xie@gmail.com> wrote:
> Hi list,
>
> I'm pleased to announce the first release of rubytest, which is a
> vim plugin aims to help you run ruby test (including vanilla test,
> rspec, shoulda etc.) conveniently.
>
> http://www.vim.org/scripts/script.php?script...
>
> Installation
> ------------
>
> Copy all files to your ~/.vim directory.
>
> Usage
> -----
>
> After installation, hit <Leader>t will run the test under your cursor
> if you are editing a ruby test file.
>
> example:
>
> $ cd <your rails/merb root>
> $ vim test/unit/user_test.rb
> (move cursor into a test case, press <Leader>t)
>
> (<Leader> is mapping to '\' by default in vim)
>
> You can customize the command which will be used to run the test case by
> settting these options in your vimrc file:
>
> =A0let g:rubytest_cmd_test =3D "ruby %p"
> =A0let g:rubytest_cmd_testcase =3D "ruby %p -n '/%c/'"
> =A0let g:rubytest_cmd_spec =3D "spec -f specdoc %p"
> =A0let g:rubytest_cmd_example =3D "spec -f specdoc %p -e '%c'"
>
> Default Key Bindings
> --------------------
>
> <Leader>t: run test case under cursor
> <Leader>T: run all tests in file
>
> I've only tested with tests in rails/merb project. Looking forward to
> receiving your feedback.
>
> Thanks,
> Jan
>
> --
> jan=3Dcallcc{|jan|jan};jan.call(jan)
>

This plugin works great for me. In the version copied into my
plugins, I changed the individual test to <Leader>\ so I could double
tap \ to run the test under the cursor. And <Leader>] to run all
tests since ] is next to \ on my keyboard and quicker to type than
<Leader>T

Thanks
Mike

1 Answer

Mike Mondragon

4/20/2009 1:40:00 AM

0

On Sun, Apr 19, 2009 at 5:38 PM, Jan <jan.h.xie@gmail.com> wrote:
> * Mike Mondragon <mikemondragon@gmail.com> [2009-04-20 08:13:22 +0900]:
>
>> This plugin works great for me. =A0In the version copied into my
>> plugins, I changed the individual test to <Leader>\ so I could double
>> tap \ to run the test under the cursor. =A0And <Leader>] to run all
>> tests since ] is next to \ on my keyboard and quicker to type than
>> <Leader>T
>>
>> Thanks
>> Mike
>
> You can customize the key bindings in your .vimrc instead of modifying
> the plugin (if I understand correctly :)
>
> =A0map <Leader>\ <Plug>RubyTestRun
> =A0map <Leader>] <Plug>RubyFileRun
>
> Cheers,
> Jan
>
> --
> jan=3Dcallcc{|jan|jan};jan.call(jan)
>

That's even better, thanks for the tip.
Mike