X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=t%2F030_roles%2F002_role.t;h=250118524c29039bcf262cd8bda5431b3fda0918;hp=577c2effb2be6b63c53073bac334c4711dc870c8;hb=7ca5c5fb6e084d9c57bc022b336458afc74c6847;hpb=43e6a50b260b096a34b0c46da87296bd220c4184 diff --git a/t/030_roles/002_role.t b/t/030_roles/002_role.t index 577c2ef..2501185 100755 --- a/t/030_roles/002_role.t +++ b/t/030_roles/002_role.t @@ -82,28 +82,32 @@ is_deeply( ok($foo_role->has_attribute('bar'), '... FooRole does have the bar attribute'); -{ -local $TODO = 'definition_context is not yet implemented'; my $bar_attr = $foo_role->get_attribute('bar'); is($bar_attr->{is}, 'rw', 'bar attribute is rw'); is($bar_attr->{isa}, 'Foo', 'bar attribute isa Foo'); -is(ref($bar_attr->{definition_context}), 'HASH', - 'bar\'s definition context is a hash'); -is($bar_attr->{definition_context}->{package}, 'FooRole', - 'bar was defined in FooRole'); +{ + local $TODO = 'definition_context is not yet implemented'; + is(ref($bar_attr->{definition_context}), 'HASH', + 'bar\'s definition context is a hash'); + is($bar_attr->{definition_context}->{package}, 'FooRole', + 'bar was defined in FooRole'); +} ok($foo_role->has_attribute('baz'), '... FooRole does have the baz attribute'); my $baz_attr = $foo_role->get_attribute('baz'); is($baz_attr->{is}, 'ro', 'baz attribute is ro'); -is(ref($baz_attr->{definition_context}), 'HASH', - 'bar\'s definition context is a hash'); -is($baz_attr->{definition_context}->{package}, 'FooRole', - 'baz was defined in FooRole'); -} # end of TODO (definition_context) + +{ + local $TODO = 'definition_context is not yet implemented'; + is(ref($baz_attr->{definition_context}), 'HASH', + 'bar\'s definition context is a hash'); + is($baz_attr->{definition_context}->{package}, 'FooRole', + 'baz was defined in FooRole'); +} # method modifiers