From: Tokuhiro Matsuno Date: Thu, 12 Mar 2009 06:25:20 +0000 (+0900) Subject: t/900_bug/001_immutable_types.t: oops. 'package B' means B.pm, reserved namespace... X-Git-Tag: 0.20~32 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=commitdiff_plain;h=89a97ba1ec0c9828cd72973f51ea7d124463b44e t/900_bug/001_immutable_types.t: oops. 'package B' means B.pm, reserved namespace. and, fixed invalid usage of subtype. --- diff --git a/t/900_bug/001_immutable_types.t b/t/900_bug/001_immutable_types.t index 96a82b5..f5e7ece 100644 --- a/t/900_bug/001_immutable_types.t +++ b/t/900_bug/001_immutable_types.t @@ -3,7 +3,7 @@ use warnings; use Test::More tests => 2; use Mouse::Util::TypeConstraints; -subtype 'Foo', where => sub { $_->isa('A') }; +subtype 'Foo', as 'Object', where { $_->isa('A') }; { package A; @@ -12,12 +12,12 @@ subtype 'Foo', where => sub { $_->isa('A') }; } { - package B; + package C; use Mouse; has a => ( is => 'rw', isa => 'Foo', coerce => 1 ); } -isa_ok(B->new(a => A->new()), 'B'); -B->meta->make_immutable; -isa_ok(B->new(a => A->new()), 'B'); +isa_ok(C->new(a => A->new()), 'C'); +C->meta->make_immutable; +isa_ok(C->new(a => A->new()), 'C');