Reorganize t/020_attributes/
[gitmo/Mouse.git] / t / 020_attributes / 035_default_undef.t
1 #!/usr/bin/env perl
2 # This is automatically generated by author/import-moose-test.pl.
3 # DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
4 use t::lib::MooseCompat;
5 use strict;
6 use warnings;
7 use Test::More;
8 use Test::Mouse;
9
10 {
11     package Foo;
12     use Mouse;
13
14     has foo => (
15         is        => 'ro',
16         isa       => 'Maybe[Int]',
17         default   => undef,
18         predicate => 'has_foo',
19     );
20 }
21
22 with_immutable {
23     is(Foo->new->foo, undef);
24     ok(Foo->new->has_foo);
25 } 'Foo';
26
27 done_testing;