Parameterized traits work in 0.64
[gitmo/MooseX-Role-Parameterized.git] / t / 016-trait.t
index f7b68ea..575b431 100644 (file)
@@ -1,8 +1,7 @@
 #!/usr/bin/env perl
 use strict;
 use warnings;
-use Test::More skip_all => "Moose doesn't yet support traits with parameters";
-#use Test::More tests => 2;
+use Test::More tests => 2;
 
 do {
     package MyTrait::Label;
@@ -32,17 +31,17 @@ do {
         traits => [
             'MyTrait::Label' => { default => 'yay' },
         ],
-        is  => 'rw',
-        isa => 'Str',
     );
 };
 
 do {
     package MyClass::LabeledURL::Redux;
     use Moose;
-    extends 'MyClass::LabeledURL';
 
-    has '+url' => (
+    has 'url' => (
+        traits => [
+            'MyTrait::Label' => { default => 'yay' },
+        ],
         label => 'overridden',
     );
 };