summaryrefslogtreecommitdiffstats
path: root/t/01-basic.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/01-basic.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/01-basic.t')
-rw-r--r--t/01-basic.t6
1 files changed, 5 insertions, 1 deletions
diff --git a/t/01-basic.t b/t/01-basic.t
index a679a47..c59a429 100644
--- a/t/01-basic.t
+++ b/t/01-basic.t
@@ -2,12 +2,14 @@
use strict;
use warnings;
use Test::More;
+use Test::Moose;
{
package Baz;
use Moose;
}
+my $i;
{
package Foo;
use Moose;
@@ -31,7 +33,6 @@ use Test::More;
class => 'Baz',
);
- my $i = 0;
has quux => (
is => 'ro',
isa => 'Str',
@@ -39,6 +40,8 @@ use Test::More;
);
}
+with_immutable {
+$i = 0;
{
my $foo = Foo->new;
ok($foo->has_service($_), "has service $_")
@@ -75,5 +78,6 @@ use Test::More;
is($foo->quux, 'XUUQ', "constructor overrides block injections");
is($foo->quux, 'XUUQ', "and returns the same thing each time");
}
+} 'Foo';
done_testing;