~ubuntu-branches/ubuntu/hardy/ruby1.8/hardy-updates

« back to all changes in this revision

Viewing changes to lib/runit/testresult.rb

  • Committer: Bazaar Package Importer
  • Author(s): akira yamada
  • Date: 2007-03-13 22:11:58 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20070313221158-h3oql37brlaf2go2
Tags: 1.8.6-1
* new upstream version, 1.8.6.
* libruby1.8 conflicts with libopenssl-ruby1.8 (< 1.8.6) (closes: #410018)
* changed packaging style to cdbs from dbs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Author:: Nathaniel Talbott.
 
2
# Copyright:: Copyright (c) 2000-2002 Nathaniel Talbott. All rights reserved.
 
3
# License:: Ruby license.
 
4
 
 
5
require 'test/unit/testresult'
 
6
 
 
7
module RUNIT
 
8
  class TestResult < Test::Unit::TestResult
 
9
    attr_reader(:errors, :failures)
 
10
    def succeed?
 
11
      return passed?
 
12
    end
 
13
    def failure_size
 
14
      return failure_count
 
15
    end
 
16
    def run_asserts
 
17
      return assertion_count
 
18
    end
 
19
    def error_size
 
20
      return error_count
 
21
    end
 
22
    def run_tests
 
23
      return run_count
 
24
    end
 
25
    def add_failure(failure)
 
26
      def failure.at
 
27
        return location
 
28
      end
 
29
      def failure.err
 
30
        return message
 
31
      end
 
32
      super(failure)
 
33
    end
 
34
    def add_error(error)
 
35
      def error.at
 
36
        return location
 
37
      end
 
38
      def error.err
 
39
        return exception
 
40
      end
 
41
      super(error)
 
42
    end
 
43
  end
 
44
end