Revert most of the conversion to Test::Fatal so we can redo it
[gitmo/Moose.git] / t / 010_basics / 002_require_superclasses.t
index 1d311a5..ad09165 100644 (file)
@@ -5,11 +5,10 @@ use warnings;
 
 use lib 't/lib', 'lib';
 
-use Test::More tests => 4;
+use Test::More;
 use Test::Exception;
 
 
-
 {
 
     package Bar;
@@ -45,3 +44,26 @@ use Test::Exception;
     'correct error when superclass could not be found';
 }
 
+{
+    package Affe;
+    our $VERSION = 23;
+}
+
+{
+    package Tiger;
+    use Moose;
+
+    ::lives_ok { extends 'Foo', Affe => { -version => 13 } }
+    'extends with version requirement';
+}
+
+{
+    package Birne;
+    use Moose;
+
+    ::throws_ok { extends 'Foo', Affe => { -version => 42 } }
+    qr/Affe version 42 required--this is only version 23/,
+    'extends with unsatisfied version requirement';
+}
+
+done_testing;