diff options
Diffstat (limited to 't/metaclasses/custom_attr_meta_as_role.t')
-rw-r--r-- | t/metaclasses/custom_attr_meta_as_role.t | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/t/metaclasses/custom_attr_meta_as_role.t b/t/metaclasses/custom_attr_meta_as_role.t new file mode 100644 index 0000000..d1790d4 --- /dev/null +++ b/t/metaclasses/custom_attr_meta_as_role.t @@ -0,0 +1,20 @@ +use strict; +use warnings; + +use Test::More; +use Test::Fatal; + +is( exception { + package MooseX::Attribute::Test; + use Moose::Role; +}, undef, 'creating custom attribute "metarole" is okay' ); + +is( exception { + package Moose::Meta::Attribute::Custom::Test; + use Moose; + + extends 'Moose::Meta::Attribute'; + with 'MooseX::Attribute::Test'; +}, undef, 'custom attribute metaclass extending role is okay' ); + +done_testing; |