Rake::TestTask already does this for you, but the environment variable is named `TEST`: https://github.com/jimweirich/rake/blob/master/lib/rake/testtask.rb#L136