X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F030_roles%2F002_role.t;h=ddba33703f2205411b001d9b669d7a8b2c9ab5ea;hb=fde8e43f95fe996fbc2a778aa259feeb04552171;hp=2504039188f773b01dcb25187b233776d6ccfd97;hpb=0bdc9d38dfd3de07aad929f6629f8fa65d434c27;p=gitmo%2FMouse.git diff --git a/t/030_roles/002_role.t b/t/030_roles/002_role.t index 2504039..ddba337 100644 --- a/t/030_roles/002_role.t +++ b/t/030_roles/002_role.t @@ -1,16 +1,15 @@ #!/usr/bin/perl +# This is automatically generated by author/import-moose-test.pl. +# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!! +use t::lib::MooseCompat; use strict; use warnings; -use Test::More tests => 40; +use Test::More; +$TODO = q{Mouse is not yet completed}; use Test::Exception; -use lib 't/lib'; -use Test::Mouse; - -use MooseCompat; - =pod NOTE: @@ -52,14 +51,13 @@ words, should 'has_method' return true for them? my $foo_role = FooRole->meta; isa_ok($foo_role, 'Mouse::Meta::Role'); -#isa_ok($foo_role, 'Class::MOP::Module'); +isa_ok($foo_role, 'Mouse::Meta::Module'); is($foo_role->name, 'FooRole', '... got the right name of FooRole'); is($foo_role->version, '0.01', '... got the right version of FooRole'); # methods ... - ok($foo_role->has_method('foo'), '... FooRole has the foo method'); is($foo_role->get_method('foo')->body, \&FooRole::foo, '... FooRole got the foo method'); @@ -92,27 +90,20 @@ is($bar_attr->{is}, 'rw', 'bar attribute is rw'); is($bar_attr->{isa}, 'Foo', 'bar attribute isa Foo'); -{ - 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'); -} +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'); - -{ - 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'); -} +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 @@ -166,3 +157,4 @@ is_deeply( [ 'bling', 'fling' ], '... got the right list of override method modifiers'); +done_testing;