Ignore __INSTANCE__ as constructor arg
[gitmo/MooseX-StrictConstructor.git] / t / instance.t
CommitLineData
d78f8e74 1use strict;
2use warnings;
3
4use Test::More;
5use Test::Moose qw( with_immutable );
6
7{
8 package Foo;
9 use Moose;
10 use MooseX::StrictConstructor;
11}
12
13with_immutable {
14 eval { Foo->new( __INSTANCE__ => Foo->new ); };
15 ok( !$@, '__INSTANCE__ is ignored when passed to ->new' );
16
17 eval { Foo->meta->new_object( __INSTANCE__ => Foo->new ); };
18 ok( !$@, '__INSTANCE__ is ignored when passed to ->new_object' );
19}
20'Foo';
21
22done_testing();