Create a gist now

Instantly share code, notes, and snippets.

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