Redid conversion to Test::Fatal
[gitmo/Moose.git] / t / 050_metaclasses / 002_custom_attr_meta_as_role.t
1 #!/usr/bin/perl
2
3 use strict;
4 use warnings;
5
6 use Test::More;
7 use Test::Fatal;
8
9 is( exception {
10     package MooseX::Attribute::Test;
11     use Moose::Role;
12 }, undef, 'creating custom attribute "metarole" is okay' );
13
14 is( exception {
15     package Moose::Meta::Attribute::Custom::Test;
16     use Moose;
17
18     extends 'Moose::Meta::Attribute';
19     with 'MooseX::Attribute::Test';
20 }, undef, 'custom attribute metaclass extending role is okay' );
21
22 done_testing;