Changeset 16076 for dotfiles

Show
Ignore:
Timestamp:
07/22/08 11:56:56 (4 months ago)
Author:
ukstudio
Message:

RSpecのモデルとコントローラに対応

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • dotfiles/vim/ukstudio/.vim/autoload/rails.vim

    r15934 r16076  
    17761776  call s:addfilecmds("functionaltest") 
    17771777  call s:addfilecmds("integrationtest") 
     1778  call s:addfilecmds("spec") 
     1779  call s:addfilecmds("speccontroller") 
     1780  call s:addfilecmds("specmodel") 
    17781781  call s:addfilecmds("stylesheet") 
    17791782  call s:addfilecmds("javascript") 
     
    19341937function! s:integrationtestList(A,L,P) 
    19351938  return s:autocamelize(s:relglob("test/integration/",s:recurse,"_test.rb"),a:A) 
     1939endfunction 
     1940 
     1941function! s:speccontrollerList(A,L,P) 
     1942  return s:autocamelize(s:relglob("spec/controllers/",s:recurse,"_controller_spec"),a:A) 
     1943endfunction 
     1944 
     1945function! s:specmodelList(A,L,P) 
     1946  return s:autocamelize(s:relglob("spec/models/",s:recurse,"_spec.rb"),a:A) 
    19361947endfunction 
    19371948 
     
    23132324  endif 
    23142325  return s:EditSimpleRb(a:bang,a:cmd,"integrationtest",f,"test/integration/","_test.rb") 
     2326endfunction 
     2327 
     2328function! s:specEdit(bang,cmd,...) 
     2329  if s:model() != '' 
     2330    let f = s:model() 
     2331    return s:EditSimpleRb(a:bang,a:cmd,"spec",f,"spec/models/","_spec.rb") 
     2332  else 
     2333    let f = s:controller() 
     2334    return s:EditSimpleRb(a:bang,a:cmd,"spec",f,"spec/controllers/","_controller_spec") 
     2335  endif 
     2336endfunction 
     2337 
     2338function! s:speccontrollerEdit(bang,cmd,...) 
     2339  let f = s:contoller() 
     2340  return s:EditSimpleRb(a:bang,a:cmd,"spec",f,"spec/controllers/","_controller_spec") 
     2341endfunction 
     2342 
     2343function! s:speccontrollerEdit(bang,cmd,...) 
     2344  let f = s:model() 
     2345  return s:EditSimpleRb(a:bang,a:cmd,"spec",f,"spec/models/","_spec.rb") 
    23152346endfunction 
    23162347