The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

Inline testing for Basset modules. Or anyone else that wants it, for that matter. Built off of Test::More.

METHODS

test

->test is the bread and butter of Basset testing. Takes one, or optionally two arguments. The first argument is always the class to test. The second argument is an optional boolean flag. If true, then the test will also test all super classes in the current package.

For more information on tests, read up on Test::More and Test::Builder.

To embed a test:

 =pod
 
 =begin btest(NAMEOFTEST)
 
 $test->ok('true value', "Testing for true value");
 $test->is(1, 1, "1 = 1");
 #etc.
 
 =end btest(NAMEOFTEST)
 
 =cut

Note that you must specify the same NAMEOFTEST on both the begin and end lines (otherwise it's a pod formatting bug), and it cannot contain any spaces.

If you append "__only" to the name of the test, then it will only be run within the test that contains it, never in a superclass. For example, this is useful if you have a dummy method in a super class that always dies with the intention of having the subclass populate it. You never want to run the superclass's tests from a subclass.

You do have access to Test::More style SKIP: blocks and the $TODO variable (declare it as our $TODO up at the top if you use todos).

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 27:

=over without closing =back

Around line 61:

=end btest without matching =begin. (Stack: =over)