Test::Class simple example



examples/test-class/t/lib/MyApp.pm
package t::lib::MyApp;
use strict;
use warnings;

use base 'Test::Class';
use Test::More;

use MyApp qw(add);

sub test_add : Test {
    is add(2, 3), 5;
}

1;

examples/test-class/t/01-test-myapp.t
use strict;
use warnings;

use lib '.';
use t::lib::MyApp;
Test::Class->runtests;