remove unneeded use of Test::Fatal
[gitmo/Moose.git] / t / 040_type_constraints / 002_util_type_constraints_export.t
index cbab89c..0ecd3fb 100644 (file)
@@ -3,30 +3,27 @@
 use strict;
 use warnings;
 
-use Test::More tests => 5;
-use Test::Exception;
-
-BEGIN {
-       use_ok('Moose::Util::TypeConstraints', { into => 'Foo' } );
-}
+use Test::More;
 
 {
     package Foo;
 
-       eval {
-               type MyRef => where { ref($_) };
-       };
-       ::ok(!$@, '... successfully exported &type to Foo package');
-       
-       eval {
-               subtype MyArrayRef 
-                       => as MyRef 
-                       => where { ref($_) eq 'ARRAY' };
-       };
-       ::ok(!$@, '... successfully exported &subtype to Foo package'); 
-       
-    Moose::Util::TypeConstraints->export_type_constraints_as_functions();      
-       
-       ::ok(MyRef({}), '... Ref worked correctly');
-       ::ok(MyArrayRef([]), '... ArrayRef worked correctly');  
-}
\ No newline at end of file
+    use Moose::Util::TypeConstraints;
+
+    eval {
+        type MyRef => where { ref($_) };
+    };
+    ::ok( !$@, '... successfully exported &type to Foo package' );
+
+    eval {
+        subtype MyArrayRef => as MyRef => where { ref($_) eq 'ARRAY' };
+    };
+    ::ok( !$@, '... successfully exported &subtype to Foo package' );
+
+    Moose::Util::TypeConstraints->export_type_constraints_as_functions();
+
+    ::ok( MyRef( {} ), '... Ref worked correctly' );
+    ::ok( MyArrayRef( [] ), '... ArrayRef worked correctly' );
+}
+
+done_testing;