X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=t%2F040_type_constraints%2F025_type_coersion_on_lazy_attributes.t;h=23b00261c51f5ae0afc3dfabd551fd454b05a440;hp=9400f1a31de220c5afb9ce1355d3867e5a4573be;hb=HEAD;hpb=9864f0e4ba233c5f30ad6dc7c484ced43d883d27 diff --git a/t/040_type_constraints/025_type_coersion_on_lazy_attributes.t b/t/040_type_constraints/025_type_coersion_on_lazy_attributes.t index 9400f1a..23b0026 100644 --- a/t/040_type_constraints/025_type_coersion_on_lazy_attributes.t +++ b/t/040_type_constraints/025_type_coersion_on_lazy_attributes.t @@ -1,9 +1,12 @@ #!/usr/bin/perl +# This is automatically generated by author/import-moose-test.pl. +# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!! +use t::lib::MooseCompat; use strict; use warnings; -use Test::More tests => 1; +use Test::More; { package SomeClass; @@ -14,7 +17,6 @@ use Test::More tests => 1; => where { /^6$/ }; subtype 'TextSix' => as 'Str' => where { /Six/i }; - coerce 'TextSix' => from 'DigitSix' => via { confess("Cannot live without 6 ($_)") unless /^6$/; 'Six' }; @@ -28,6 +30,8 @@ use Test::More tests => 1; ); } +my $attr = SomeClass->meta->get_attribute('foo'); +is($attr->get_value(SomeClass->new()), 'Six'); is(SomeClass->new()->foo, 'Six'); - +done_testing;