Make "rake test" display not only task name but also exception message.

This commit is contained in:
Wen-Tien Chang 2011-06-29 17:15:55 +08:00
parent 31536855ae
commit 89ad0629e0

@ -79,10 +79,10 @@ task :test do
Rake::Task[task].invoke
nil
rescue => e
task
{ :task => task, :exception => e }
end
end.compact
abort "Errors running #{errors * ', '}!" if errors.any?
abort errors.map { |e| "Errors running #{e[:task]}! #{e[:exception].inspect}" }.join("\n") if errors.any?
end
namespace :test do