From: Todd Hepler Date: Fri, 5 Dec 2008 21:25:38 +0000 (+0000) Subject: TODO test for how I expected ->does to work X-Git-Tag: 0.05~46 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=21b211986468781b293636d49087616fe211559b;p=gitmo%2FMooseX-Role-Parameterized.git TODO test for how I expected ->does to work --- diff --git a/t/013-does.t b/t/013-does.t new file mode 100644 index 0000000..c7132c5 --- /dev/null +++ b/t/013-does.t @@ -0,0 +1,30 @@ + +use strict; +use warnings; + +#use Test::More tests => 3; +use Test::More skip_all => 'TODO'; +use Test::Moose; + +{ + package MyPRole; + use MooseX::Role::Parameterized; + role {}; +} + +{ + package MyClass; + use Moose; + with 'MyPRole', +} + +my $generated_role = MyClass->meta->roles->[0]->name; +does_ok( 'MyClass', $generated_role, 'class does the generate role' ); +does_ok( 'MyClass', 'MyPRole', 'class does the parameterized role' ); +cmp_ok( + $generated_role->meta->get_roles->[0]->name, + 'eq', + 'MyProle', + 'generated role does the parameterized role' +); +