diff options
Diffstat (limited to 't/02-deps.t')
-rw-r--r-- | t/02-deps.t | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/t/02-deps.t b/t/02-deps.t index 73b3d4a..4b1143a 100644 --- a/t/02-deps.t +++ b/t/02-deps.t @@ -2,6 +2,7 @@ use strict; use warnings; use Test::More; +use Test::Moose; { package Baz; @@ -14,12 +15,12 @@ use Test::More; ); } +my $i; { package Foo; use Moose; use MooseX::Bread::Board; - my $i = 0; has bar => ( is => 'ro', isa => 'Str', @@ -34,12 +35,13 @@ use Test::More; ); } -{ +with_immutable { + $i = 0; my $foo = Foo->new; my $baz = $foo->baz; is($baz->bar, '0', "deps resolved correctly"); is($baz->bar, '0', "doesn't re-resolve, since Baz is a normal class"); is($foo->baz->bar, '1', "re-resolves since the baz attr isn't a singleton"); -} +} 'Foo'; done_testing; |