diff options
| author | franck cuny <franck@lumberjaph.net> | 2010-04-29 09:16:10 +0200 |
|---|---|---|
| committer | franck cuny <franck@lumberjaph.net> | 2010-04-29 09:16:10 +0200 |
| commit | c8d40ecee67b80a8665eb0928882cb7fa2d15fde (patch) | |
| tree | 993c09eead0c24709c4252fdaaca5b87b36f396c /t/15_protected_attribute.t | |
| parent | POD cleaning (diff) | |
| download | moosex-privacy-c8d40ecee67b80a8665eb0928882cb7fa2d15fde.tar.gz | |
update tests, use with_immutable
Diffstat (limited to '')
| -rw-r--r-- | t/15_protected_attribute.t | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/t/15_protected_attribute.t b/t/15_protected_attribute.t index 3c2ae8d..fe3fd9a 100644 --- a/t/15_protected_attribute.t +++ b/t/15_protected_attribute.t @@ -1,8 +1,9 @@ use strict; use warnings; -use Test::More tests => 5; +use Test::More tests => 10; use Test::Exception; +use Test::Moose; { @@ -24,16 +25,18 @@ use Test::Exception; use Moose; extends 'Foo'; - sub bar { (shift)->foo }; + sub bar { (shift)->foo } } -ok my $foo = Foo->new(); -dies_ok { $foo->foo }; -is scalar @{ $foo->meta->local_protected_attributes }, 1; - -ok my $bar = Bar->new(); -ok $bar->bar(); +with_immutable { + ok my $foo = Foo->new(); + dies_ok { $foo->foo }; + is scalar @{ $foo->meta->local_protected_attributes }, 1; + ok my $bar = Bar->new(); + ok $bar->bar(); +} +(qw/Foo Bar/); |
