failing test class_type meta class
[gitmo/Moose.git] / t / 040_type_constraints / 035_type_class_meta.t
CommitLineData
c19af49f 1use strict;
2use Test::More tests => 1;
3
4{
5package Type;
6use Moose;
7}
8
9{ package
10 Signatures;
11
12use Moose;
13
14use Moose::Util::TypeConstraints;
15
16subtype CustomType => as class_type('Type');
17subtype CustomType2 => as 'Type';
18
19has file => ( isa => 'CustomType', is => 'rw' );
20has file2 => ( isa => 'CustomType2', is => 'rw' );
21}
22
23
24my $sig = new Signatures;
25$sig->file(Type->new);
26
27is(ref $sig->meta->get_attribute('file')->type_constraint, 'Moose::Meta::TypeConstraint::Class');
28is(ref $sig->meta->get_attribute('file2')->type_constraint, 'Moose::Meta::TypeConstraint::Class');