From: Yuval Kogman Date: Sat, 23 May 2009 21:13:42 +0000 (+0200) Subject: Update test suite for subname changes in Class::MOP X-Git-Tag: 0.80~68 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d1135dbd5c8910b2784cc1748672aef64a38e4a8;p=gitmo%2FMoose.git Update test suite for subname changes in Class::MOP --- diff --git a/lib/Moose/Manual/Delta.pod b/lib/Moose/Manual/Delta.pod index 969ae47..0503ca0 100644 --- a/lib/Moose/Manual/Delta.pod +++ b/lib/Moose/Manual/Delta.pod @@ -16,6 +16,10 @@ feature. If you encounter a problem and have a solution but don't see it documented here, or think we missed an important feature, please send us a patch. +=head1 Version 0.80 + +Update test suite for subname change in Class::MOP + =head1 Version 0.78 C now imports C and C into packages diff --git a/t/030_roles/032_roles_and_method_cloning.t b/t/030_roles/032_roles_and_method_cloning.t index edaf281..9cd45e0 100644 --- a/t/030_roles/032_roles_and_method_cloning.t +++ b/t/030_roles/032_roles_and_method_cloning.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 16; +use Test::More tests => 17; { @@ -71,9 +71,11 @@ use Test::More tests => 16; 'original fq name is Role::Foo::foo' ); } -is( ClassB->foo, 'ClassB::foo', 'ClassB::foo knows its name' ); +isnt( ClassA->foo, "ClassB::foo", "ClassA::foo is not confused with ClassB::foo"); + { local $TODO = "multiply-consumed roles' subs take on their most recently used name"; + is( ClassB->foo, 'ClassB::foo', 'ClassB::foo knows its name' ); is( ClassA->foo, 'ClassA::foo', 'ClassA::foo knows its name' ); } diff --git a/t/100_bugs/022_role_caller.t b/t/100_bugs/022_role_caller.t index 69988c3..474179e 100644 --- a/t/100_bugs/022_role_caller.t +++ b/t/100_bugs/022_role_caller.t @@ -11,11 +11,15 @@ package MyClass2; use Moose; with 'MyRole'; no Moose; package main; -use Test::More tests => 2; +use Test::More tests => 4; { - local $TODO = 'for rafl'; + local $TODO = 'Role composition does not clone methods yet'; is(MyClass1->foo, 'MyClass1::foo', 'method from role has correct name in caller()'); + is(MyClass2->foo, 'MyClass2::foo', + 'method from role has correct name in caller()'); } -is(MyClass2->foo, 'MyClass2::foo'); + +isnt(MyClass1->foo, "MyClass2::foo", "role method is not confused with other class" ); +isnt(MyClass2->foo, "MyClass1::foo", "role method is not confused with other class" );