X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F010_basics%2F006_override_and_foreign_classes.t;h=05761c970738e26140275012d3be7537f1b37b22;hb=61697425b329bc667185bb5b2f4be223f2be62c0;hp=26fbb44d0256b2b8faa518956102de183c4b3a9e;hpb=e606ae5f848070d889472329819c95f5ba763ca3;p=gitmo%2FMoose.git diff --git a/t/010_basics/006_override_and_foreign_classes.t b/t/010_basics/006_override_and_foreign_classes.t index 26fbb44..05761c9 100644 --- a/t/010_basics/006_override_and_foreign_classes.t +++ b/t/010_basics/006_override_and_foreign_classes.t @@ -3,21 +3,20 @@ use strict; use warnings; -use Test::More tests => 15; - +use Test::More; =pod This just tests the interaction of override/super -with non-Moose superclasses. It really should not -cause issues, the only thing it does is to create -a metaclass for Foo so that it can find the right +with non-Moose superclasses. It really should not +cause issues, the only thing it does is to create +a metaclass for Foo so that it can find the right super method. -This may end up being a sensitive issue for some -non-Moose classes, but in 99% of the cases it -should be just fine. +This may end up being a sensitive issue for some +non-Moose classes, but in 99% of the cases it +should be just fine. =cut @@ -25,27 +24,27 @@ should be just fine. package Foo; use strict; use warnings; - + sub new { bless {} => shift() } - + sub foo { 'Foo::foo' } - sub bar { 'Foo::bar' } + sub bar { 'Foo::bar' } sub baz { 'Foo::baz' } - + package Bar; use Moose; - + extends 'Foo'; - - override bar => sub { 'Bar::bar -> ' . super() }; - + + override bar => sub { 'Bar::bar -> ' . super() }; + package Baz; use Moose; - + extends 'Bar'; - - override bar => sub { 'Baz::bar -> ' . super() }; - override baz => sub { 'Baz::baz -> ' . super() }; + + override bar => sub { 'Baz::bar -> ' . super() }; + override baz => sub { 'Baz::baz -> ' . super() }; } my $baz = Baz->new(); @@ -70,4 +69,6 @@ isa_ok($foo, 'Foo'); is($foo->foo(), 'Foo::foo', '... got the right value from &foo'); is($foo->bar(), 'Foo::bar', '... got the right value from &bar'); -is($foo->baz(), 'Foo::baz', '... got the right value from &baz'); \ No newline at end of file +is($foo->baz(), 'Foo::baz', '... got the right value from &baz'); + +done_testing;