Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 7455

Show
Ignore:
Timestamp:
09/11/07 05:19:15 (1 year ago)
Author:
bitsweat
Message:

Don't raise superfluous exception on test failure.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/railties/lib/tasks/testing.rake

    r6344 r7455  
    4141desc 'Test all units and functionals' 
    4242task :test do 
    43   exceptions = ["test:units", "test:functionals", "test:integration"].collect do |task| 
     43  %w(test:units test:functionals test:integration).collect do |task| 
    4444    begin 
    4545      Rake::Task[task].invoke 
    4646      nil 
    4747    rescue => e 
    48       e 
     48      e unless e.message.starts_with?('Command failed with status (1)') 
    4949    end 
    50   end.compact 
    51    
    52   exceptions.each {|e| puts e;puts e.backtrace } 
    53   raise "Test failures" unless exceptions.empty? 
     50  end.compact.each do |e| 
     51    puts e 
     52    puts "  #{e.backtrace * "  \n"}" 
     53  end 
    5454end 
    5555