From 06f919c57dfc917e50e6858100cfbe3a1b57a1be Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 21 Feb 2011 01:53:08 -0600 Subject: make sure i'm testing immutability too --- t/03-lifecycle.t | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 't/03-lifecycle.t') diff --git a/t/03-lifecycle.t b/t/03-lifecycle.t index aedf96c..8308e59 100644 --- a/t/03-lifecycle.t +++ b/t/03-lifecycle.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', @@ -35,7 +36,8 @@ use Test::More; ); } -{ +with_immutable { + $i = 0; my $foo = Foo->new; my $baz = $foo->baz; is($baz->bar, '0', "deps resolved correctly"); @@ -44,6 +46,6 @@ use Test::More; "doesn't re-resolve since the baz attr is a singleton"); is($foo->baz, $foo->baz, "doesn't re-resolve since the baz attr is a singleton"); -} +} 'Foo'; done_testing; -- cgit v1.2.3