Skip to content

Instantly share code, notes, and snippets.

@reinh
Created January 15, 2010 00:39
Show Gist options
  • Save reinh/277662 to your computer and use it in GitHub Desktop.
Save reinh/277662 to your computer and use it in GitHub Desktop.
function s:GetTestCmd()
let test_patterns = {}
let test_patterns['_test.rb$'] = "ruby %p"
let test_patterns['_spec.rb$'] = "spec -f specdoc %p"
for [pattern, cmd] in items(test_patterns)
if @% =~ pattern
return cmd
endif
endfor
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment