X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F030_roles%2Ffailing%2F012_method_exclusion_in_composition.t;h=d852b17e12e22d1c35567d2324cea13b11647714;hb=6cfa1e5e70616fb102915489c02d8347ffa912fb;hp=1ea0858d126b47fd9c150baed4c39ff54aa199d1;hpb=c2d7552a4161bdbf505e8dfbcbd53ba244c430b9;p=gitmo%2FMouse.git diff --git a/t/030_roles/failing/012_method_exclusion_in_composition.t b/t/030_roles/failing/012_method_exclusion_in_composition.t index 1ea0858..d852b17 100644 --- a/t/030_roles/failing/012_method_exclusion_in_composition.t +++ b/t/030_roles/failing/012_method_exclusion_in_composition.t @@ -19,7 +19,7 @@ use Test::Exception; package My::Class; use Mouse; - with 'My::Role' => { excludes => 'bar' }; + with 'My::Role' => { -excludes => 'bar' }; } ok(My::Class->meta->has_method($_), "we have a $_ method") for qw(foo baz); @@ -29,7 +29,7 @@ ok(!My::Class->meta->has_method('bar'), '... but we excluded bar'); package My::OtherRole; use Mouse::Role; - with 'My::Role' => { excludes => 'foo' }; + with 'My::Role' => { -excludes => 'foo' }; sub foo { 'My::OtherRole::foo' } sub bar { 'My::OtherRole::bar' } @@ -60,8 +60,8 @@ ok(My::OtherRole->meta->requires_method('bar'), '... and the &bar method is requ use Mouse; ::lives_ok { - with 'Foo::Role' => { excludes => 'foo' }, - 'Bar::Role' => { excludes => 'foo' }, + with 'Foo::Role' => { -excludes => 'foo' }, + 'Bar::Role' => { -excludes => 'foo' }, 'Baz::Role'; } '... composed our roles correctly'; @@ -70,7 +70,7 @@ ok(My::OtherRole->meta->requires_method('bar'), '... and the &bar method is requ ::throws_ok { with 'Foo::Role', - 'Bar::Role' => { excludes => 'foo' }, + 'Bar::Role' => { -excludes => 'foo' }, 'Baz::Role'; } qr/Due to a method name conflict in roles 'Baz::Role' and 'Foo::Role', the method 'foo' must be implemented or excluded by 'My::Foo::Class::Broken'/, '... composed our roles correctly'; @@ -88,8 +88,8 @@ ok(My::OtherRole->meta->requires_method('bar'), '... and the &bar method is requ use Mouse::Role; ::lives_ok { - with 'Foo::Role' => { excludes => 'foo' }, - 'Bar::Role' => { excludes => 'foo' }, + with 'Foo::Role' => { -excludes => 'foo' }, + 'Bar::Role' => { -excludes => 'foo' }, 'Baz::Role'; } '... composed our roles correctly'; } @@ -103,7 +103,7 @@ ok(!My::Foo::Role->meta->requires_method('foo'), '... and the &foo method is not ::lives_ok { with 'Foo::Role', - 'Bar::Role' => { excludes => 'foo' }, + 'Bar::Role' => { -excludes => 'foo' }, 'Baz::Role'; } '... composed our roles correctly'; }