X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F800_shikabased%2F008-create_class.t;h=7d561e0a2e380150ece3052c96e335345757d0cd;hb=cf938ec7ea7a0c91c19aa0b1d61fad651f8529b3;hp=76e5bcb99daa817232bc97242271889947b184b0;hpb=7a1781ae4d22b7fd52894fc8cbbad2fe55e0295d;p=gitmo%2FMouse.git diff --git a/t/800_shikabased/008-create_class.t b/t/800_shikabased/008-create_class.t index 76e5bcb..7d561e0 100644 --- a/t/800_shikabased/008-create_class.t +++ b/t/800_shikabased/008-create_class.t @@ -1,7 +1,7 @@ use strict; use warnings; use Mouse (); -use Test::More tests => 19; +use Test::More tests => 23; use Test::Exception; # error handling @@ -83,3 +83,19 @@ ok !$anon_pkg1->can('meta'); ok $anon_pkg2->can('meta'), 'cache => 1 makes it immortal'; +my $obj; +{ + my $anon = Mouse::Meta::Class->create_anon_class(superclasses => ['Mouse::Object']); + lives_ok{ $anon->make_immutable() } 'make anon class immutable'; + $obj = $anon->name->new(); +} + +SKIP:{ + skip 'Moose has a bug', 3 if 'Mouse' eq 'Moose'; + + isa_ok $obj, 'Mouse::Object'; + can_ok $obj, 'meta'; + lives_and{ + isa_ok $obj->meta, 'Mouse::Meta::Class'; + }; +}