Skip to content

Instantly share code, notes, and snippets.

@godfat
Forked from ihower/gist:1053478
Created June 29, 2011 09:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save godfat/1053481 to your computer and use it in GitHub Desktop.
Save godfat/1053481 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].inspect}" }.join("\n") if errors.any?
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment