Skip to content

Instantly share code, notes, and snippets.

@joemsak
Created October 4, 2014 19:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joemsak/e3227f11fe7f7e07d891 to your computer and use it in GitHub Desktop.
Save joemsak/e3227f11fe7f7e07d891 to your computer and use it in GitHub Desktop.
if match(a:filename, '\.feature$') != -1
exec ":!script/features " . a:filename
else
if filereadable("script/test")
exec ":!script/test " . a:filename
elseif filereadable("Gemfile")
if match(a:filename, '_test') != -1
exec ":!bundle exec rake test " . a:filename
else
exec ":!bundle exec rspec --color " . a:filename
end
elseif match(a:filename, '_tests') != -1
exec ":!nosetests --rednose " . a:filename
elseif match(a:filename, '_test') != -1
exec ":!lein difftest " . a:filename
elseif match(a:filename, 'Test') != -1
exec ":!javac " . a:filename . ".java && java " . a:filename
else
exec ":!rspec --color " . a:filename
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment