Subject: | Test::Unit::TestSuite::new overwrites self reference type |
Test::Unit::TestSuite::new overwrites self reference type.
It sets its own reference type to $test.
You should change this block
elsif (defined $test and $test->isa('Test::Unit::TestCase')) {
$class = ref $test ? ref $test : $test;
$self->{units} = [ $test->list_tests ];
}
To this:
elsif (defined $test and $test->isa('Test::Unit::TestCase')) {
$self->{units} = [ $test ];
}
The work around is to use Test::Unit::TestSuite::empty_new