X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F025-more-isa.t;h=e59ef90026967db657b5a2bedec8ef56ffcce529;hb=6719984210754e8d012ae678536f194c35000823;hp=9db3441e08b8a35fb5df3619e63ceba83be08ebc;hpb=3118622d182add6c88792d5de3b4af047e8a7c8c;p=gitmo%2FMouse.git diff --git a/t/025-more-isa.t b/t/025-more-isa.t index 9db3441..e59ef90 100644 --- a/t/025-more-isa.t +++ b/t/025-more-isa.t @@ -1,8 +1,8 @@ #!/usr/bin/env perl use strict; use warnings; -use Test::More tests => 29; -use t::Exception; +use Test::More tests => 30; +use Test::Exception; do { package Class; @@ -12,6 +12,9 @@ do { is => 'rw', isa => 'Test::Builder', ); + + package Test::Builder::Subclass; + our @ISA = qw(Test::Builder); }; can_ok(Class => 'tb'); @@ -21,6 +24,13 @@ lives_ok { }; lives_ok { + # Test::Builder was a bizarre choice, because it's a singleton. Because of + # that calling new on T:B:S won't work. Blessing directly -- rjbs, + # 2008-12-04 + Class->new(tb => (bless {} => 'Test::Builder::Subclass')); +}; + +lives_ok { my $class = Class->new; $class->tb(Test::Builder->new); isa_ok($class->tb, 'Test::Builder');