From 89cb34c9cfe9d169b79206b74c602e91bc7116a5 Mon Sep 17 00:00:00 2001 From: Michael Koziarski Date: Tue, 20 Feb 2007 03:15:26 +0000 Subject: Stop swallowing errors during rake test [Koz] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6176 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/lib/tasks/testing.rake | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'railties/lib/tasks') diff --git a/railties/lib/tasks/testing.rake b/railties/lib/tasks/testing.rake index 59ce7af888..ba50a365c3 100644 --- a/railties/lib/tasks/testing.rake +++ b/railties/lib/tasks/testing.rake @@ -40,14 +40,17 @@ end desc 'Test all units and functionals' task :test do - Rake::Task["test:units"].invoke rescue got_error = true - Rake::Task["test:functionals"].invoke rescue got_error = true + exceptions = ["test:units", "test:functionals", "test:integration"].collect do |task| + begin + Rake::Task[task].invoke + nil + rescue => e + e + end + end.compact - if File.exist?("test/integration") - Rake::Task["test:integration"].invoke rescue got_error = true - end - - raise "Test failures" if got_error + exceptions.each {|e| puts e;puts e.backtrace } + raise "Test failures" unless exceptions.empty? end namespace :test do -- cgit v1.2.3