Throw a more useful error when users try to use a parameterized type,
[gitmo/Mouse.git] / t / 043-parameterized-type.t
diff --git a/t/043-parameterized-type.t b/t/043-parameterized-type.t
new file mode 100644 (file)
index 0000000..8bc1d98
--- /dev/null
@@ -0,0 +1,22 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Test::More tests => 1;
+use Test::Exception;
+
+TODO: {
+    local $TODO = "Mouse does not support parameterized types yet";
+
+    eval {
+        package Foo;
+        use Mouse;
+
+        has foo => (
+            is  => 'ro',
+            isa => 'HashRef[Int]',
+        );
+    };
+
+    ok(Foo->meta->has_attribute('foo'));
+};
+