Skip to content

Instantly share code, notes, and snippets.

@ihower
Created June 29, 2011 09:00
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 ihower/1053478 to your computer and use it in GitHub Desktop.
Save ihower/1053478 to your computer and use it in GitHub Desktop.
desc 'Runs test:units, test:functionals, test:integration together (also available: test:benchmark, test:profile, test:plugins)'
task :test do
tests_to_run = ENV['TEST'] ? ["test:single"] : %w(test:units test:functionals test:integration)
errors = tests_to_run.collect do |task|
begin
Rake::Task[task].invoke
nil
rescue => e
{ :task => task, :exception => e }
end
end.compact
abort errors.map { |e| "Errors running #{e[:task]}! #{e[:exception]}" }.join("\n") if errors.any?
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment