Types with :: in their name now die on declaration
[gitmo/MooseX-Types.git] / t / 11_library-definition.t
index c71fede..59d77b5 100644 (file)
@@ -12,7 +12,7 @@ my @tests = (
     [ 'IntArrayRef', 12, [12], {}, [17, 23], {} ],
 );
 
-plan tests => (@tests * 8) + 1;
+plan tests => (@tests * 8) + 3;
 
 # new array ref so we can safely shift from it
 for my $data (map { [@$_] } @tests) {
@@ -43,3 +43,7 @@ for my $data (map { [@$_] } @tests) {
 
 # coercion not available
 ok ! __PACKAGE__->can('to_TwentyThree'), "type without coercion doesn't have to_* helper";
+
+eval { require TestNamespaceSep };
+ok   $@,                q(trying to declare a type with '::' in it croaks);
+like $@, qr/Foo::Bar/,  q(error message contains type name);