Created
October 9, 2015 08:40
-
-
Save HakubJozak/43ab41fbe25d3c27240f to your computer and use it in GitHub Desktop.
Single test runner in Rails
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 | |
# ($:).unshift 'test' | |
($:).unshift '.' | |
file = ARGV.shift | |
opts = ARGV.join(' ') | |
cmd = if opts | |
%{bin/rake test #{file} TESTOPTS="#{opts}"} | |
else | |
%{bin/rake test #{file}} | |
end | |
puts "(from #{__FILE__}: #{cmd})" | |
system cmd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment