vendor/bundle/ruby/1.8/gems/ZenTest-4.6.2/lib/autotest.rb
def handle_results results
    results = results.gsub(/\e\[\d+m/, '') # strip ascii color
    failed = results.scan self.failed_results_re
    completed = results[self.completed_re]

    if completed then
      completed = completed.scan(/(\d+) (\w+)/).map { |v, k| [k, v.to_i] }

      self.latest_results = Hash[*completed.flatten]
      self.files_to_test  = consolidate_failures failed

      color = self.files_to_test.empty? ? :green : :red
      hook color unless $TESTING
    else
      self.latest_results = nil
    end

    self.tainted = true unless self.files_to_test.empty?
  end
##
# Check results for failures, set the "bar" to red or green, and if
# there are failures record this.
Check results for failures, set the "bar" to red or green, and if
there are failures record this.
Check results for failures set the " bar " to red or green and if there are failures record this .
def handle_results results
    results = results.gsub(/\e\[\d+m/, '') 
    failed = results.scan self.failed_results_re
    completed = results[self.completed_re]
    if completed then
      completed = completed.scan(/(\d+) (\w+)/).map { |v, k| [k, v.to_i] }
      self.latest_results = Hash[*completed.flatten]
      self.files_to_test  = consolidate_failures failed
      color = self.files_to_test.empty? ? :green : :red
      hook color unless $TESTING
    else
      self.latest_results = nil
    end
    self.tainted = true unless self.files_to_test.empty?
  end
def handle_results results results = results . gsub ( / \e \[ \d +m / , '' ) failed = results . scan self . failed_results_re completed = results [ self . completed_re ] if completed then completed = completed . scan ( / ( \d +) ( \w +) / ) . map { | v , k | [ k , v . to_i ] } self . latest_results = Hash [ * completed . flatten ] self . files_to_test = consolidate_failures failed color = self . files_to_test . empty? ? :green : :red hook color unless $TESTING else self . latest_results = nil end self . tainted = true unless self . files_to_test . empty? end
Check results for failures, set the "bar" to red or green, and if
there are failures record this.
Check results for failures set the " bar " to red or green and if there are failures record this .
# strip ascii color
results