deferred constructor construction
[gitmo/Moo.git] / t / class-tiny-accessors.t
1 use strictures 1;
2 use Test::More;
3
4 {
5   package Foo;
6
7   use Class::Tiny;
8
9   has one => (is => 'ro');
10   has two => (is => 'rw', init_arg => undef);
11   has three => (is => 'ro', init_arg => 'THREE', required => 1);
12 }
13
14 my $foo = Foo->new(
15   one => 1,
16   THREE => 3
17 );
18
19 is_deeply(
20   { %$foo }, { one => 1, three => 3 }, 'internals ok'
21 );
22
23 done_testing;