diff options
author | Michael Koziarski <michael@koziarski.com> | 2007-02-20 03:15:26 +0000 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2007-02-20 03:15:26 +0000 |
commit | 89cb34c9cfe9d169b79206b74c602e91bc7116a5 (patch) | |
tree | 3c2db42b2713a19c4bb0c20ece085ca5f7f79b3e /railties/lib/tasks | |
parent | 772e02dd62989dbe08cc774a5ada2ae6430033ad (diff) | |
download | rails-89cb34c9cfe9d169b79206b74c602e91bc7116a5.tar.gz rails-89cb34c9cfe9d169b79206b74c602e91bc7116a5.tar.bz2 rails-89cb34c9cfe9d169b79206b74c602e91bc7116a5.zip |
Stop swallowing errors during rake test [Koz]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6176 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib/tasks')
-rw-r--r-- | railties/lib/tasks/testing.rake | 17 |
1 files changed, 10 insertions, 7 deletions
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 |