Test::Unit Improvements

Test::Unit Improvements
Added by Daniel Berger 690 days ago

The Test::Unit library has undergone some nice improvements recently.

The Test::Unit::TestCase library now supports startup and shutdown methods. Unlike setup and teardown, which run once per test, the startup and shutdown methods only run once per test case. Useful for socket connections and the like where you only want to connect once per test case.

The assert_raise_kind_of assertion was added to better deal with cross platform systems testing. This typically means checking for SystemCallError, since different platforms raise different errors, depending on the situation.

The skip assertion was added as a handy way to skip a test based on certain conditions. Any assertions following the skip declaration will not be run and the test will be tallied as a skipped test in the final output.

Take a look at the CHANGES wiki link, and follow the test-unit link for more information.

Enjoy!

Dan


Comments