test for throwing when a class is empty or nonexistent in a loaded file
[gitmo/Class-MOP.git] / t / 083_load_class.t
index c4569c5..2a11077 100644 (file)
@@ -1,6 +1,6 @@
 use strict;
 use warnings;
-use Test::More tests => 32;
+use Test::More;
 use Test::Exception;
 
 require Class::MOP;
@@ -145,3 +145,13 @@ throws_ok {
         'an @ISA with members does mean a class is loaded' );
 }
 
+{
+
+    throws_ok {
+       Class::MOP::load_class("MistypedPackageName")
+    } qr/empty/, 'throws for nonexistent package name with something in a sub-namespace';
+
+}
+
+
+done_testing;