- Inheritance
- < Object
A collection of tests which can be run.
Note: It is easy to confuse a TestSuite instance with something that has a static suite method; I know because I have trouble keeping them straight. Think of something that has a suite method as simply providing a way to get a meaningful TestSuite instance.
Constants
| Name | Description | |
|---|---|---|
| FINISHED | = name + "::FINISHED" | |
| STARTED | = name + "::STARTED" |
Attributes
| Name | Visibility | R/W | Description |
|---|---|---|---|
| name | public | R | |
| tests | public | R |
Methods
Class
| Visibility | Signature |
|---|---|
| public | new (name="Unnamed TestSuite") |
Instance
| Visibility | Signature |
|---|---|
| public | << (test) |
| public | == (other) |
| public | delete (test) |
| public | empty? () |
| public | run (result) {|STARTED, name| ...} |
| public | size () |
| public | to_s () |
Class Method Detail
new(name="Unnamed TestSuite")
Instance Method Detail
<<(test)
Adds the test to the suite.
==(other)
It‘s handy to be able to compare TestSuite instances.
delete(test)
empty?()
run(result) {|STARTED, name| ...}
Runs the tests and/or suites contained in this TestSuite.
size()
Retuns the rolled up number of tests in this suite; i.e. if the suite contains other suites, it counts the tests within those suites, not the suites themselves.
to_s()
Overridden to return the name given the suite at creation.