Module Test::Unit::Assertions
|
In: |
test/unit/assertions.rb
|
|
The assertion upon which all other assertions are based. Passes if the
block yields true.
Passes if boolean is true.
Passes if expected == actual. Note that the ordering of arguments is
important, since a helpful error message is generated when this one fails
that tells you the values of expected and actual.
Passes if block raises exception.
Passes if object.class == klass.
Passes if object.nil?.
Passes if object.kind_of?(klass).
Passes if object.respond_to?(method) is true.
Passes if string =~ regularExpression.
Passes if actual.equal?(expected) (i.e. they are the same instance).
Compares the two objects based on the passed operator. Passes if
object1.send(operator, object2) is true.
Passes if block does not raise an exception.
Always fails.
Passes if !actual.equal?(expected).
Passes if expected != actual.
Passes if !object.nil?.
Passes if string !~ regularExpression.
Passes if block throws symbol.
Passes if block does not throw anything.
Passes if expected_float and actual_float are equal within delta tolerance.
Passes if the method sent returns a true value.
Called whenever an assertion is made.