Mouse::Util::does_role() respects $thing->does() method
[gitmo/Mouse.git] / t / 040_type_constraints / 025_type_coersion_on_lazy_attributes.t
index 9400f1a..23b0026 100644 (file)
@@ -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;