Sha256: a9977f3a40a7dd50e69575ff540192d580d6117bba0f30c95efe395898306295

Contents?: true

Size: 495 Bytes

Versions: 16

Compression:

Stored size: 495 Bytes

Contents

let $RUBYPATH = 'lib' 

function! s:run_example()
    if &ft != "ruby"
        " Not ruby, do nothing.
        return
    endif

    " look for it ", with no word character just before ‘it’
    let line    = search( '\w\@<!it "', "bnW" )
    let cmd     = "rspec --no-color " . expand( "%" ) . " -l " . line

    if line > 0
        execute "!" . cmd
    else
        echo "No rspec example found at or before cursor position."
    endif
endfun
nmap <leader>t :call <SID>run_example()<CR>


Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
git-topic-0.2.7.3 .vimrc
git-topic-0.2.7.2 .vimrc
git-topic-0.2.7.1 .vimrc
git-topic-0.2.7 .vimrc
git-topic-0.2.6.1 .vimrc
git-topic-0.2.6 .vimrc
git-topic-0.2.5 .vimrc
git-topic-0.2.4.1 .vimrc
git-topic-0.2.4 .vimrc
git-topic-0.2.3.3 .vimrc
git-topic-0.2.3.2 .vimrc
git-topic-0.2.3.1 .vimrc
git-topic-0.2.3 .vimrc
git-topic-0.2.2 .vimrc
git-topic-0.2.1 .vimrc
git-topic-0.1.6.4 .vimrc