From: Shawn M Moore Date: Tue, 25 Nov 2008 06:05:07 +0000 (+0000) Subject: More tests X-Git-Tag: 0.62~19 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bf26e705ee212b31786d7d9a264830041936c3ba;p=gitmo%2FMoose.git More tests --- diff --git a/t/030_roles/034_create_role.t b/t/030_roles/034_create_role.t index d57181f..8c1df50 100644 --- a/t/030_roles/034_create_role.t +++ b/t/030_roles/034_create_role.t @@ -1,7 +1,7 @@ #!/usr/bin/env perl use strict; use warnings; -use Test::More tests => 3; +use Test::More tests => 4; use Moose (); my $role = Moose::Meta::Role->create( @@ -28,3 +28,5 @@ ok($visored->is_worn, "accessor was consumed"); $visored->remove; ok(!$visored->is_worn, "method was consumed"); +ok(!$role->is_anon_role, "the role is not anonymous"); + diff --git a/t/030_roles/035_anonymous_roles.t b/t/030_roles/035_anonymous_roles.t index 911012a..7087085 100644 --- a/t/030_roles/035_anonymous_roles.t +++ b/t/030_roles/035_anonymous_roles.t @@ -1,7 +1,7 @@ #!/usr/bin/env perl use strict; use warnings; -use Test::More tests => 3; +use Test::More tests => 5; use Moose (); my $role = Moose::Meta::Role->create_anon_role( @@ -27,3 +27,6 @@ ok($visored->is_worn, "accessor was consumed"); $visored->remove; ok(!$visored->is_worn, "method was consumed"); +like($role->name, qr/^Moose::Meta::Role::__ANON__::SERIAL::\d+$/, ""); +ok($role->is_anon_role, "the role knows it's anonymous"); +