Cleanup failing tests
[gitmo/Mouse.git] / Moose-t-failing / 020_attributes / 023_attribute_names.t
diff --git a/Moose-t-failing/020_attributes/023_attribute_names.t b/Moose-t-failing/020_attributes/023_attribute_names.t
new file mode 100644 (file)
index 0000000..6eb442d
--- /dev/null
@@ -0,0 +1,63 @@
+#!/usr/bin/perl
+# This is automatically generated by author/import-moose-test.pl.
+# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
+use t::lib::MooseCompat;
+
+use strict;
+use warnings;
+use Test::More;
+$TODO = q{Mouse is not yet completed};
+use Test::Exception;
+
+my $exception_regex = qr/You must provide a name for the attribute/;
+{
+    package My::Role;
+    use Mouse::Role;
+
+    ::throws_ok {
+        has;
+    } $exception_regex, 'has; fails';
+
+    ::throws_ok {
+        has undef;
+    } $exception_regex, 'has undef; fails';
+
+    ::lives_ok {
+        has "" => (
+            is => 'bare',
+        );
+    } 'has ""; works now';
+
+    ::lives_ok {
+        has 0 => (
+            is => 'bare',
+        );
+    } 'has 0; works now';
+}
+
+{
+    package My::Class;
+    use Mouse;
+
+    ::throws_ok {
+        has;
+    } $exception_regex, 'has; fails';
+
+    ::throws_ok {
+        has undef;
+    } $exception_regex, 'has undef; fails';
+
+    ::lives_ok {
+        has "" => (
+            is => 'bare',
+        );
+    } 'has ""; works now';
+
+    ::lives_ok {
+        has 0 => (
+            is => 'bare',
+        );
+    } 'has 0; works now';
+}
+
+done_testing;