| Module | Test::Unit::Assertions |
| In: |
unit/assertions.rb
|
Contains all of the standard Test::Unit assertions. Mixed in to Test::Unit::TestCase. To mix it in and use its functionality, you simply need to rescue Test::Unit::AssertionFailedError, and you can additionally override add_assertion to be notified whenever an assertion is made.
Notes:
| UncaughtThrow | = | {NameError => /^uncaught throw \`(.+)\'$/, ThreadError => /^uncaught throw \`(.+)\' in thread /} |
Select whether or not to use the prettyprinter. If this option is set to false before any assertions are made, the prettyprinter will not be required at all.
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.
Compares the two objects based on the passed operator. Passes if object1.send(operator, object2) is true.