X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F020_attributes%2Ffailing%2F031_delegation_and_modifiers.t;fp=t%2F020_attributes%2Ffailing%2F031_delegation_and_modifiers.t;h=0000000000000000000000000000000000000000;hb=fde8e43f95fe996fbc2a778aa259feeb04552171;hp=2a8d62af9651ea2e2814e2cb000dfd120b0d8358;hpb=0bdc9d38dfd3de07aad929f6629f8fa65d434c27;p=gitmo%2FMouse.git diff --git a/t/020_attributes/failing/031_delegation_and_modifiers.t b/t/020_attributes/failing/031_delegation_and_modifiers.t deleted file mode 100644 index 2a8d62a..0000000 --- a/t/020_attributes/failing/031_delegation_and_modifiers.t +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/perl - -use strict; -use warnings; - -use Test::More tests => 5; -use Test::Exception; - -{ - package Bar; - use Mouse; - - sub baz { 'Bar::baz' } - sub gorch { 'Bar::gorch' } - - package Foo; - use Mouse; - - has 'bar' => ( - is => 'ro', - isa => 'Bar', - lazy => 1, - default => sub { Bar->new }, - handles => [qw[ baz gorch ]] - ); - - package Foo::Extended; - use Mouse; - - extends 'Foo'; - - has 'test' => ( - is => 'rw', - isa => 'Bool', - default => sub { 0 }, - ); - - around 'bar' => sub { - my $next = shift; - my $self = shift; - - $self->test(1); - $self->$next(); - }; -} - -my $foo = Foo::Extended->new; -isa_ok($foo, 'Foo::Extended'); -isa_ok($foo, 'Foo'); - -ok(!$foo->test, '... the test value has not been changed'); - -is($foo->baz, 'Bar::baz', '... got the right delegated method'); - -ok($foo->test, '... the test value has now been changed'); - - - - - - - -