-
-
Save warmwaffles/9eee7c3ddcd24b16a645 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Put this on your path or in <app>/bin/m and then execute individual tests | |
# with `bin/m path/to/test` | |
$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