Revert autogenerated tests. Tests should not changed radically.
[gitmo/Mouse.git] / t / 010_basics / 002_require_superclasses.t
diff --git a/t/010_basics/002_require_superclasses.t b/t/010_basics/002_require_superclasses.t
new file mode 100644 (file)
index 0000000..da4776a
--- /dev/null
@@ -0,0 +1,47 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use lib 't/lib', 'lib';
+
+use Test::More tests => 4;
+use Test::Exception;
+
+
+
+{
+
+    package Bar;
+    use Mouse;
+
+    ::lives_ok { extends 'Foo' } 'loaded Foo superclass correctly';
+}
+
+{
+
+    package Baz;
+    use Mouse;
+
+    ::lives_ok { extends 'Bar' } 'loaded (inline) Bar superclass correctly';
+}
+
+{
+
+    package Foo::Bar;
+    use Mouse;
+
+    ::lives_ok { extends 'Foo', 'Bar' }
+    'loaded Foo and (inline) Bar superclass correctly';
+}
+
+{
+
+    package Bling;
+    use Mouse;
+
+    ::throws_ok { extends 'No::Class' }
+    qr{Can't locate No/Class\.pm in \@INC},
+    'correct error when superclass could not be found';
+}
+