fix portability between Moose/Mouse's class_type
[gitmo/Mouse.git] / t / 800_shikabased / 005-class_type.t
index e58fde2..5b61762 100644 (file)
@@ -8,7 +8,14 @@ use Test::More tests => 4;
 
     require t::lib::ClassType_Foo;
 
-    class_type Headers => { class => 't::lib::ClassType_Foo' };
+    # XXX: This below API is different from that of Moose.
+    # class_type() should be class_type 'ClassName';
+    #    class_type 'Headers' => { class => 't::lib::ClassType_Foo' };
+    # this should be subtype Headers => as 't::lib::ClassType_foo';
+    subtype 'Headers'
+        => as 't::lib::ClassType_Foo'
+    ;
+        
     coerce 'Headers' =>
         from 'HashRef' => via {
             t::lib::ClassType_Foo->new(%{ $_ });