Skip to content

Commit

Permalink
Don't raise superfluous exception on test failure.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7455 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
jeremy committed Sep 11, 2007
1 parent ea0975a commit d54a156
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions railties/lib/tasks/testing.rake
Expand Up @@ -40,17 +40,17 @@ end

desc 'Test all units and functionals'
task :test do
exceptions = ["test:units", "test:functionals", "test:integration"].collect do |task|
%w(test:units test:functionals test:integration).collect do |task|
begin
Rake::Task[task].invoke
nil
rescue => e
e
e unless e.message.starts_with?('Command failed with status (1)')
end
end.compact

exceptions.each {|e| puts e;puts e.backtrace }
raise "Test failures" unless exceptions.empty?
end.compact.each do |e|
puts e
puts " #{e.backtrace * " \n"}"
end
end

namespace :test do
Expand Down

0 comments on commit d54a156

Please sign in to comment.