This provides better feedback to students than just blowing up trying to load
the relevant module in the tests.
use MooseClass::Tests;
-use Person;
-use Employee;
-
MooseClass::Tests::tests01();
use MooseClass::Tests;
-use Person;
-use Employee;
-
MooseClass::Tests::tests02();
use MooseClass::Tests;
-use Person;
-use Employee;
-
MooseClass::Tests::tests03();
use MooseClass::Tests;
-use Document;
-use Report;
-use TPSReport;
-
MooseClass::Tests::tests04();
use MooseClass::Tests;
-use Person;
-use Employee;
-
MooseClass::Tests::tests05();
use MooseClass::Tests;
-use Person;
-use Employee;
-use BankAccount;
-
MooseClass::Tests::tests06();
{
local $Test::Builder::Level = $Test::Builder::Level + 1;
+ has_meta('Person');
+ has_meta('Employee');
has_meta('BankAccount');
no_droppings('BankAccount');
sub has_meta {
my $class = shift;
+ use_ok($class)
+ or BAIL_OUT("$class cannot be loaded");
+
ok( $class->can('meta'), "$class has a meta() method" )
or BAIL_OUT("$class does not have a meta() method (did you forget to 'use Moose'?)");
}