1package My::Test::Class;
2
3use Test::More;
4
5use Moose;
6
7BEGIN { extends 'Test::Class' }
8
9has 'class' => (
10    is  => 'rw',
11    isa => 'Str',
12);
13
14sub new {
15    my ($class, @args) = @_;
16    my $self = $class->SUPER::new(@args);
17    return $class->meta->new_object(
18        __INSTANCE__ => $self, @args
19    );
20}
21
22sub startup : Tests(startup => 1) {
23    my ($test) = @_;
24    (my $class = ref $test) =~ s/^Test:://xms;
25    use_ok $class or die;
26    $test->class($class);
27    return;
28}
29
30no Moose;
31__PACKAGE__->meta->make_immutable(inline_constructor => 0);
321;
33