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/01-basic.t | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 't/01-basic.t') 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; -- cgit v1.2.3