Helper syntax to write Test::Class tests explained in brief.
Test::Class::Sugar allows you to override some of the assumptions it makes, but not all of them. However, future updates may provide that option. After running the testclass code block, Test::Class::Sugar generates the following code:
{
package Test::Person;
use base qw/Test::Class/;
use strict; use warnings;
require Person;
sub subject { 'Person' };
...
}
To use Test::Class::Sugar, you need to include it in your code and use the testclass exercises Person code block. When you start the test with Test::Class::Sugar, the module magically includes Test::Most for you. By default, Test::Class::Sugar assumes that the startup has a value of 1.
The SYNOPSIS section of Test::Class::Sugar provides examples of how to use the module. The code block includes tests for autonaming, the naming of parts, and multiple assertions. Test::Class->runtests is used to run the tests.
Overall, Test::Class::Sugar simplifies the process of setting up Test::Class based tests by eliminating the need for tedious boilerplate code. With this module, you can focus on what you're testing and leave the rest to the assumptions made by Test::Class::Sugar.
Version 0.0200: N/A