Skip to content

Instantly share code, notes, and snippets.

@eric
Created January 14, 2010 04:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save eric/276854 to your computer and use it in GitHub Desktop.
Save eric/276854 to your computer and use it in GitHub Desktop.
namespace :test do
task :populate_testopts do
if ENV['TESTNAME'].present?
ENV['TESTOPTS'] = ENV['TESTOPTS'] ? "#{ENV['TESTOPTS']} " : ''
ENV['TESTOPTS'] += "--name=#{ENV['TESTNAME'].inspect}"
end
end
end
%w(test:units test:functionals test:integration).each do |task_name|
Rake::Task[task_name].prerequisites << 'test:populate_testopts'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment