12/19/2017 - 10:28 AM

Giving names to tests

With a larger amount of tests, each one can be given a little descriptive name as the second argument to ok().

use Test::Simple tests => 2;

ok(defined $ical,            'new() returned something'); # checking we have something
ok($ical->isa('Date::ICal'), " and it's the right class" ); # checking its the right class

# the above prints:
ok 1 - new() returned something
ok 2 -  and it's the right class