X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F800_shikabased%2F005-class_type.t;h=18418e3d1e15e1c0895cea3e3d2529c64f413370;hb=2f665925359d9fba8a49baeccd7ad798f733221d;hp=d8b89cff3182c0bb196cd04a68006430da49847f;hpb=61a02a3addc8542afac0bbd222610d7e050137ce;p=gitmo%2FMouse.git diff --git a/t/800_shikabased/005-class_type.t b/t/800_shikabased/005-class_type.t index d8b89cf..18418e3 100644 --- a/t/800_shikabased/005-class_type.t +++ b/t/800_shikabased/005-class_type.t @@ -1,22 +1,15 @@ use strict; use warnings; use Test::More tests => 4; - -{ - package Response::Headers; - use Mouse; - has 'foo' => ( is => 'rw' ); -} - { package Response; use Mouse; use Mouse::TypeRegistry; - class_type Headers => { class => 'Response::Headers' }; + class_type Headers => { class => 't::lib::ClassType_Foo' }; coerce 'Headers' => from 'HashRef' => via { - Response::Headers->new(%{ $_ }); + t::lib::ClassType_Foo->new(%{ $_ }); }, ; @@ -28,8 +21,8 @@ use Test::More tests => 4; } my $res = Response->new(headers => { foo => 'bar' }); -isa_ok($res->headers, 'Response::Headers'); +isa_ok($res->headers, 't::lib::ClassType_Foo'); is($res->headers->foo, 'bar'); $res->headers({foo => 'yay'}); -isa_ok($res->headers, 'Response::Headers'); +isa_ok($res->headers, 't::lib::ClassType_Foo'); is($res->headers->foo, 'yay');