Commit | Line | Data |
d78f8e74 |
1 | use strict; |
2 | use warnings; |
3 | |
4 | use Test::More; |
5 | use Test::Moose qw( with_immutable ); |
a2edc419 |
6 | use Test::Fatal; |
d78f8e74 |
7 | |
8 | { |
9 | package Foo; |
10 | use Moose; |
11 | use MooseX::StrictConstructor; |
12 | } |
13 | |
14 | with_immutable { |
a2edc419 |
15 | is( |
16 | exception { Foo->new( __INSTANCE__ => Foo->new ) }, |
17 | undef, |
18 | '__INSTANCE__ is ignored when passed to ->new', |
19 | ); |
d78f8e74 |
20 | |
a2edc419 |
21 | is( |
22 | exception { Foo->meta->new_object( __INSTANCE__ => Foo->new ) }, |
23 | undef, |
24 | '__INSTANCE__ is ignored when passed to ->new_object', |
25 | ); |
d78f8e74 |
26 | } |
27 | 'Foo'; |
28 | |
29 | done_testing(); |