diff options
Diffstat (limited to 't/metaclasses/new_metaclass.t')
-rw-r--r-- | t/metaclasses/new_metaclass.t | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/t/metaclasses/new_metaclass.t b/t/metaclasses/new_metaclass.t new file mode 100644 index 0000000..7d439b1 --- /dev/null +++ b/t/metaclasses/new_metaclass.t @@ -0,0 +1,27 @@ +use strict; +use warnings; +use Test::More; + +do { + package My::Meta::Class; + use Moose; + BEGIN { extends 'Moose::Meta::Class' }; + + package Moose::Meta::Class::Custom::MyMetaClass; + sub register_implementation { 'My::Meta::Class' } +}; + +do { + package My::Class; + use Moose -metaclass => 'My::Meta::Class'; +}; + +do { + package My::Class::Aliased; + use Moose -metaclass => 'MyMetaClass'; +}; + +is(My::Class->meta->meta->name, 'My::Meta::Class'); +is(My::Class::Aliased->meta->meta->name, 'My::Meta::Class'); + +done_testing; |