setting up 0.53
[gitmo/Moose.git] / t / 020_attributes / 012_misc_attribute_tests.t
index d25d1c8..24e3f70 100644 (file)
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 42;
+use Test::More tests => 44;
 use Test::Exception;
 
 BEGIN {
@@ -87,6 +87,28 @@ BEGIN {
 
 {
     {
+        package Test::Arrayref::RoleAttributes::Role;
+        use Moose::Role;
+
+        has [qw(foo bar baz)] => (
+            is => 'rw',
+        );
+
+    }
+    {
+        package Test::Arrayref::RoleAttributes;
+        use Moose;
+        with 'Test::Arrayref::RoleAttributes::Role';
+    }
+
+    my $test = Test::Arrayref::RoleAttributes->new;
+    isa_ok($test, 'Test::Arrayref::RoleAttributes');
+    can_ok($test, qw(foo bar baz));
+
+}
+
+{
+    {
         package Test::UndefDefault::Attributes;
         use Moose;
 
@@ -120,7 +142,8 @@ BEGIN {
 
     throws_ok {
         $moose_obj->a_str( $moose_obj )
-    } qr/Attribute \(a_str\) does not pass the type constraint \(Str\) with OverloadedStr\=HASH\(.*?\)/, '... dies without overloading the string';
+    } qr/Attribute \(a_str\) does not pass the type constraint because\: Validation failed for 'Str' failed with value OverloadedStr=HASH\(0x.+?\)/, 
+    '... dies without overloading the string';
 
 }
 
@@ -134,7 +157,8 @@ BEGIN {
 
     throws_ok {
         OverloadBreaker->new;
-    } qr/Attribute \(a_num\) does not pass the type constraint \(Int\) with \'7\.5\'/, '... this doesnt trip overload to break anymore ';
+    } qr/Attribute \(a_num\) does not pass the type constraint because\: Validation failed for 'Int' failed with value 7\.5/, 
+    '... this doesnt trip overload to break anymore ';
 
     lives_ok {
         OverloadBreaker->new(a_num => 5);