X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Frole-tiny.t;h=69ee7ef8a20f9b8e050405bc2e146d670821e73d;hb=204ca0d38067b0586461f3c258e56ef9ef1190dd;hp=b3ee22f0764e1d302186a3fc73b69c402946862b;hpb=0c1452084664fd02a26f5efac1409ab45cf8a04d;p=gitmo%2FMoo.git diff --git a/t/role-tiny.t b/t/role-tiny.t index b3ee22f..69ee7ef 100644 --- a/t/role-tiny.t +++ b/t/role-tiny.t @@ -51,7 +51,7 @@ BEGIN { sub try_apply_to { my $to = shift; - exception { Role::Tiny->apply_role_to_package('MyRole', $to) } + exception { Role::Tiny->apply_role_to_package($to, 'MyRole') } } is(try_apply_to('MyClass'), undef, 'role applies cleanly'); @@ -65,8 +65,8 @@ like(try_apply_to('NoMethods'), qr/req1, req2/, 'error for both methods'); like(try_apply_to('OneMethod'), qr/req2/, 'error for one method'); is exception { - Role::Tiny->apply_role_to_package('MyRole', 'IntermediaryRole'); - Role::Tiny->apply_role_to_package('IntermediaryRole', 'ExtraClass'); + Role::Tiny->apply_role_to_package('IntermediaryRole', 'MyRole'); + Role::Tiny->apply_role_to_package('ExtraClass', 'IntermediaryRole'); }, undef, 'No errors applying roles'; ok(ExtraClass->does('MyRole'), 'ExtraClass does MyRole');