Skip to content

Instantly share code, notes, and snippets.

@warmwaffles
Last active August 29, 2015 14:05
Show Gist options
  • Save warmwaffles/0e8c27e114940f2f69cf to your computer and use it in GitHub Desktop.
Save warmwaffles/0e8c27e114940f2f69cf to your computer and use it in GitHub Desktop.
Minitest runner without a lot of cruft
#!/usr/bin/env ruby
# Put in ~/bin as ~/bin/m and make it executable
$LOAD_PATH.unshift('lib', 'spec', 'test')
ARGV.each do |path|
if File.directory?(path)
dir = path.gsub(/\/+\Z/, '')
Dir.glob("#{dir}/**/*_{spec,test}.rb").each { |f| load(f) }
else
load(path)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment