Test that a lazy attr without a default or builder dies
[gitmo/Moose.git] / t / 040_type_constraints / 002_util_type_constraints_export.t
index 85faf6b..0ecd3fb 100644 (file)
@@ -3,17 +3,13 @@
 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;
 
+    use Moose::Util::TypeConstraints;
+
     eval {
         type MyRef => where { ref($_) };
     };
@@ -29,3 +25,5 @@ BEGIN {
     ::ok( MyRef( {} ), '... Ref worked correctly' );
     ::ok( MyArrayRef( [] ), '... ArrayRef worked correctly' );
 }
+
+done_testing;