X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t-failing%2F030_roles%2F013_method_aliasing_in_composition.t;fp=t%2F030_roles%2F013_method_aliasing_in_composition.t;h=1934d64a16b4a3e134ef98f084d8dff0b031d133;hb=fde8e43f95fe996fbc2a778aa259feeb04552171;hp=9cb7b9be948240c4a2598350c37a2b920d580678;hpb=0bdc9d38dfd3de07aad929f6629f8fa65d434c27;p=gitmo%2FMouse.git diff --git a/t/030_roles/013_method_aliasing_in_composition.t b/t-failing/030_roles/013_method_aliasing_in_composition.t similarity index 92% rename from t/030_roles/013_method_aliasing_in_composition.t rename to t-failing/030_roles/013_method_aliasing_in_composition.t index 9cb7b9b..1934d64 100644 --- a/t/030_roles/013_method_aliasing_in_composition.t +++ b/t-failing/030_roles/013_method_aliasing_in_composition.t @@ -1,13 +1,16 @@ #!/usr/bin/perl +# This is automatically generated by author/import-moose-test.pl. +# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!! +use t::lib::MooseCompat; use strict; use warnings; -use Test::More tests => 46; +use Test::More; +$TODO = q{Mouse is not yet completed}; use Test::Exception; - { package My::Role; use Mouse::Role; @@ -58,11 +61,8 @@ ok(My::Class->meta->has_method($_), "we have a $_ method") for qw(foo baz bar ro } ok(My::OtherRole->meta->has_method($_), "we have a $_ method") for qw(foo baz role_bar); -{ -local $TODO = 'auto requires resolution is not supported'; ok(My::OtherRole->meta->requires_method('bar'), '... and the &bar method is required'); ok(!My::OtherRole->meta->requires_method('role_bar'), '... and the &role_bar method is not required'); -} { package My::AliasingRole; @@ -104,11 +104,12 @@ ok(!My::AliasingRole->meta->requires_method('bar'), '... and the &bar method is package My::Foo::Class::Broken; use Mouse; - ::dies_ok { + ::throws_ok { with 'Foo::Role' => { -alias => { 'foo' => 'foo_foo' }, -excludes => 'foo' }, 'Bar::Role' => { -alias => { 'foo' => 'foo_foo' }, -excludes => 'foo' }, 'Baz::Role'; - } '... composed our roles correctly'; + } qr/Due to a method name conflict in roles 'Bar::Role' and 'Foo::Role', the method 'foo_foo' must be implemented or excluded by 'My::Foo::Class::Broken'/, + '... composed our roles correctly'; } { @@ -137,11 +138,8 @@ ok(!My::Foo::Role->meta->requires_method('foo'), '... and the &foo method is not { package My::Foo::Role::Other; - use Test::More; # for $TODO use Mouse::Role; - local $TODO = 'not supported'; - ::lives_ok { with 'Foo::Role' => { -alias => { 'foo' => 'foo_foo' }, -excludes => 'foo' }, 'Bar::Role' => { -alias => { 'foo' => 'foo_foo' }, -excludes => 'foo' }, @@ -150,10 +148,8 @@ ok(!My::Foo::Role->meta->requires_method('foo'), '... and the &foo method is not } ok(!My::Foo::Role::Other->meta->has_method('foo_foo'), "we dont have a foo_foo method"); -{ -local $TODO = 'auto requires resolution is not supported'; ok(My::Foo::Role::Other->meta->requires_method('foo_foo'), '... and the &foo method is required'); -} + { package My::Foo::AliasOnly; use Mouse; @@ -219,3 +215,5 @@ ok(My::Foo::AliasOnly->meta->has_method('foo_foo'), '.. and the aliased foo_foo for qw( x1 foo_x1 ); ok( ! $baz->has_method('y1'), 'Role::Baz has no y1 method' ); } + +done_testing;