diff options
-rw-r--r-- | t/20-inheritance.t | 3 | ||||
-rw-r--r-- | t/21-roles.t | 3 | ||||
-rw-r--r-- | t/40-mop.t | 5 |
3 files changed, 9 insertions, 2 deletions
diff --git a/t/20-inheritance.t b/t/20-inheritance.t index b5e7b67..2324673 100644 --- a/t/20-inheritance.t +++ b/t/20-inheritance.t @@ -2,6 +2,7 @@ use strict; use warnings; use Test::More; +use Test::Moose; { package Parent; @@ -52,6 +53,7 @@ use Test::More; ); } +with_immutable { { my $parent = Parent->new; ok($parent->has_service('foo'), "parent has foo"); @@ -116,5 +118,6 @@ use Test::More; is($child->baz, 'ZAB'); is($child->quux, 'OOFOOFBARZABQUUX'); } +} 'Parent', 'Child'; done_testing; diff --git a/t/21-roles.t b/t/21-roles.t index b2c5f2a..60a8c45 100644 --- a/t/21-roles.t +++ b/t/21-roles.t @@ -2,6 +2,7 @@ use strict; use warnings; use Test::More; +use Test::Moose; { package Role1; @@ -87,6 +88,7 @@ use Test::More; ); } +with_immutable { { my $parent = Parent->new; ok($parent->has_service('role1'), "parent has role1"); @@ -167,5 +169,6 @@ use Test::More; is($child->baz, 'ZAB'); is($child->quux, 'OOFOOFBAR1ELORZAB1ELOR2ELORQUUX'); } +} 'Parent', 'Child'; done_testing; @@ -2,6 +2,7 @@ use strict; use warnings; use Test::More; +use Test::Moose; { package Foo; @@ -25,7 +26,7 @@ use Test::More; ); } -{ +with_immutable { my $foo = Foo->new; my $foo_attr = $foo->meta->get_attribute('foo'); my $bar_attr = $foo->meta->get_attribute('bar'); @@ -33,6 +34,6 @@ use Test::More; is($bar_attr->get_value($foo), 'FOOBAR', "right value"); ok(!$foo_attr->has_value($foo), "no value"); ok(!$bar_attr->has_value($foo), "no value"); -} +} 'Foo'; done_testing; |