X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F001_mouse%2F808-create_class.t;h=fc6f05aec3a02b55bda67f23cb82c0ef148a21b6;hb=HEAD;hp=7d561e0a2e380150ece3052c96e335345757d0cd;hpb=849b02a951189021f7c7253121e1974a26e3162b;p=gitmo%2FMouse.git diff --git a/t/001_mouse/808-create_class.t b/t/001_mouse/808-create_class.t index 7d561e0..fc6f05a 100644 --- a/t/001_mouse/808-create_class.t +++ b/t/001_mouse/808-create_class.t @@ -1,9 +1,10 @@ use strict; use warnings; -use Mouse (); -use Test::More tests => 23; +use Test::More tests => 25; use Test::Exception; +use Mouse (); + # error handling throws_ok { Mouse::Meta::Class->create( @@ -83,6 +84,14 @@ ok !$anon_pkg1->can('meta'); ok $anon_pkg2->can('meta'), 'cache => 1 makes it immortal'; +my $anon = Mouse::Meta::Class->create_anon_class( + constructor_class => 'ConstructorX', + destructor_class => 'DestructorX', +); + +is $anon->constructor_class, 'ConstructorX'; +is $anon->destructor_class, 'DestructorX'; + my $obj; { my $anon = Mouse::Meta::Class->create_anon_class(superclasses => ['Mouse::Object']);