summaryrefslogtreecommitdiffstats
path: root/t/02-deps.t
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2011-02-21 01:53:08 -0600
committerJesse Luehrs <doy@tozt.net>2011-02-21 01:53:08 -0600
commit06f919c57dfc917e50e6858100cfbe3a1b57a1be (patch)
tree8d269551288407c1cc78c9d7ad7466cf7e9a8bcb /t/02-deps.t
parentd1149a69c6121025816d388fadc3861e7407c594 (diff)
downloadbread-board-declare-06f919c57dfc917e50e6858100cfbe3a1b57a1be.tar.gz
bread-board-declare-06f919c57dfc917e50e6858100cfbe3a1b57a1be.zip
make sure i'm testing immutability too
Diffstat (limited to 't/02-deps.t')
-rw-r--r--t/02-deps.t8
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;