Class

Test::Unit::TestResult

Inheritance
< Object
Included Modules
Util::Observable

Collects Test::Unit::Failure and Test::Unit::Error so that they can be displayed to the user. To this end, observers can be added to it, allowing the dynamic updating of, say, a UI.

Constants

Name   Description
CHANGED = "CHANGED"
FAULT = "FAULT"

Attributes

Name Visibility R/W Description
assertion_count public R
run_count public R

Methods

Class

Visibility Signature
public new ()

Instance

Visibility Signature
public add_assertion ()
public add_error (error)
public add_failure (failure)
public add_run ()
public error_count ()
public failure_count ()
public passed? ()
public to_s ()

Class Method Detail

new()

Constructs a new, empty TestResult.

Instance Method Detail

add_assertion()

Records an individual assertion.

add_error(error)

Records a Test::Unit::Error.

add_failure(failure)

Records a Test::Unit::Failure.

add_run()

Records a test run.

error_count()

Returns the number of errors this TestResult has recorded.

failure_count()

Returns the number of failures this TestResult has recorded.

passed?()

Returns whether or not this TestResult represents successful completion.

to_s()

Returns a string contain the recorded runs, assertions, failures and errors in this TestResult.