Reorganize t/020_attributes/
[gitmo/Mouse.git] / t / 020_attributes / 035_default_undef.t
diff --git a/t/020_attributes/035_default_undef.t b/t/020_attributes/035_default_undef.t
new file mode 100644 (file)
index 0000000..3d899a3
--- /dev/null
@@ -0,0 +1,27 @@
+#!/usr/bin/env 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;
+use Test::Mouse;
+
+{
+    package Foo;
+    use Mouse;
+
+    has foo => (
+        is        => 'ro',
+        isa       => 'Maybe[Int]',
+        default   => undef,
+        predicate => 'has_foo',
+    );
+}
+
+with_immutable {
+    is(Foo->new->foo, undef);
+    ok(Foo->new->has_foo);
+} 'Foo';
+
+done_testing;