Move non-useful, Moose-specific methods into t/lib/Test/Mouse.pm
[gitmo/Mouse.git] / t / 800_shikabased / 014-subtype-as.t
index 8ee8ef0..3dc197b 100644 (file)
@@ -16,7 +16,7 @@ use Scalar::Util qw/blessed/;
 {
     package Foo;
     use Mouse;
-    use Mouse::TypeRegistry;
+    use Mouse::Util::TypeConstraints;
 
     subtype 'Type1' => as 'Str' => where { blessed($_) };
     has str_obj => (
@@ -37,7 +37,7 @@ use Scalar::Util qw/blessed/;
     );
 
 
-    subtype 'Type4';
+    type 'Type4';
     has any => (
         is     => 'rw',
         isa    => 'Type4',
@@ -64,6 +64,7 @@ isa_ok $f2, 'Foo';
 is ref($f2->as_only), 'Obj1';
 
 my $f3 = eval { Foo->new( any => Obj1->new ) };
+die $@ if $@;
 isa_ok $f3, 'Foo';
 is ref($f3->any), 'Obj1';