X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F025-more-isa.t;h=e59ef90026967db657b5a2bedec8ef56ffcce529;hb=bcc5080bdc8c8b3edfbb3dd6af0b65224074043f;hp=f092bede9eb2d9f4845b65619608f6b594ada609;hpb=8c831d08b0d23c9dfcc4a85f6444915c988b5538;p=gitmo%2FMouse.git diff --git a/t/025-more-isa.t b/t/025-more-isa.t index f092bed..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 Mouse::Util ':test'; +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');