Just a quick heads up and request for comments on a testing module I'm putting together.

Test::Object

See search.cpan.org once the initial POD-only upload is done, but in short I want a way to be able to define tests or groups of tests that ANY object of a particular class should pass, and then be able to throw objects at a test function and have it test that object against *every* class that the object claims to implement.

I'm hitting this problem with large and deep class trees where what I should really be doing is testing it against every parent class and role, but in reality I do the specifics for that subclass, plus a couple
of specific ones for the parents.

The HTML version outlines the details well enough.

You would...

  Test::Object->register( 'Class::Name' => \&coderef );

... the tests for various classes, and then just pass any object to...

  object_ok( $object );

... and Test::Object will throw the object at all appropriate registered tests.

Thoughts? Something exist already that I'm missing?

Adam K

Reply via email to