X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=t%2F020_attributes%2F035_default_undef.t;fp=t%2F020_attributes%2F035_default_undef.t;h=3d899a304392edec0f1cc6927f2b3577b287ccd6;hp=0000000000000000000000000000000000000000;hb=fde8e43f95fe996fbc2a778aa259feeb04552171;hpb=0bdc9d38dfd3de07aad929f6629f8fa65d434c27 diff --git a/t/020_attributes/035_default_undef.t b/t/020_attributes/035_default_undef.t new file mode 100644 index 0000000..3d899a3 --- /dev/null +++ b/t/020_attributes/035_default_undef.t @@ -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;