File tree Expand file tree Collapse file tree 3 files changed +17
-6
lines changed Expand file tree Collapse file tree 3 files changed +17
-6
lines changed Original file line number Diff line number Diff line change 1+ * .swp
Original file line number Diff line number Diff line change 1+ install :
2+ cp -v plugin/* ~ /.vim/plugin/
3+ cp -v syntax/* ~ /.vim/syntax/
Original file line number Diff line number Diff line change 11"
22" Vim Rspec
33" Last change: March 3 2009
4- " Version> 0.0.1
4+ " Version> 0.0.2
55" Maintainer: Eustáquio 'TaQ' Rangel
66" License: GPL
77" URL: git://github.com/taq/vim-rspec
@@ -56,11 +56,18 @@ function! s:RunSpecMain(type)
5656 if isdirectory (l: dir ." /spec" )>0
5757 call s: notice_msg (" Running spec on the spec directory ..." )
5858 else
59- " try to find a /spec on the current path
60- " TODO: walk on the path to find the spec directory
61- let l: mend = matchend (l: dir ,' /spec' )
62- if l: mend >0
63- let l: dir = strpart (l: dir ,0 ,l: mend )
59+ " try to find a spec directory on the current path
60+ let l: tokens = split (l: dir ," /" )
61+ let l: dir = " "
62+ for l: item in l: tokens
63+ call remove (l: tokens ,-1 )
64+ let l: path = " /" .join (l: tokens ," /" )." /spec"
65+ if isdirectory (l: path )
66+ let l: dir = l: path
67+ break
68+ end
69+ endfor
70+ if len (l: dir )>0
6471 call s: notice_msg (" Running spec on the spec directory found (" .l: dir ." ) ..." )
6572 else
6673 call s: error_msg (" No " .l: dir ." /spec directory found" )
You can’t perform that action at this time.
0 commit comments