Ignore __INSTANCE__ as constructor arg
[gitmo/MooseX-StrictConstructor.git] / t / instance.t
1 use strict;
2 use warnings;
3
4 use Test::More;
5 use Test::Moose qw( with_immutable );
6
7 {
8     package Foo;
9     use Moose;
10     use MooseX::StrictConstructor;
11 }
12
13 with_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
22 done_testing();