From: Moritz Onken Date: Sat, 13 Jun 2009 22:09:22 +0000 (+0200) Subject: failing test class_type meta class X-Git-Tag: 0.82~14 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c19af49f6e834464f5b8a864f4a4ece99d8feeaf;p=gitmo%2FMoose.git failing test class_type meta class --- diff --git a/t/040_type_constraints/035_type_class_meta.t b/t/040_type_constraints/035_type_class_meta.t new file mode 100644 index 0000000..67f0532 --- /dev/null +++ b/t/040_type_constraints/035_type_class_meta.t @@ -0,0 +1,28 @@ +use strict; +use Test::More tests => 1; + +{ +package Type; +use Moose; +} + +{ package + Signatures; + +use Moose; + +use Moose::Util::TypeConstraints; + +subtype CustomType => as class_type('Type'); +subtype CustomType2 => as 'Type'; + +has file => ( isa => 'CustomType', is => 'rw' ); +has file2 => ( isa => 'CustomType2', is => 'rw' ); +} + + +my $sig = new Signatures; +$sig->file(Type->new); + +is(ref $sig->meta->get_attribute('file')->type_constraint, 'Moose::Meta::TypeConstraint::Class'); +is(ref $sig->meta->get_attribute('file2')->type_constraint, 'Moose::Meta::TypeConstraint::Class'); \ No newline at end of file