X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F030_roles%2F001_meta_role.t;h=143cf9f193736d014a9201baa724bd5e8fe16da2;hb=475ddfa7a25848f2e73be6f0fc156a57315bcc0d;hp=d6160b6230ab500b4e222ef3a083475e7a188f59;hpb=73e9153a57c2adfd533a0ac5a3ad843ebfd4c7e7;p=gitmo%2FMouse.git diff --git a/t/030_roles/001_meta_role.t b/t/030_roles/001_meta_role.t old mode 100755 new mode 100644 index d6160b6..143cf9f --- a/t/030_roles/001_meta_role.t +++ b/t/030_roles/001_meta_role.t @@ -58,11 +58,12 @@ is_deeply( ok($foo_role->has_attribute('bar'), '... FooRole does have the bar attribute'); -is_deeply( - join('|', %{$foo_role->get_attribute('bar')}), - join('|', %{+{ is => 'rw', isa => 'Foo' }}), - '... got the correct description of the bar attribute'); - +{ + is_deeply( + join('|', %{$foo_role->get_attribute('bar')}), + join('|', %{+{ is => 'rw', isa => 'Foo' }}), + '... got the correct description of the bar attribute'); +} lives_ok { $foo_role->add_attribute('baz' => (is => 'ro')); } '... added the baz attribute okay'; @@ -75,8 +76,8 @@ is_deeply( ok($foo_role->has_attribute('baz'), '... FooRole does have the baz attribute'); is_deeply( - $foo_role->get_attribute('baz'), - { is => 'ro' }, + $foo_role->get_attribute('baz')->{is}, + 'ro', '... got the correct description of the baz attribute'); lives_ok {