## Let's check all the expected validation errors for tuple
like $simple_tuple->validate({a=>1,b=>2}),
- qr/Validation failed for 'simple_tuple' failed with value { a => 1, b => 2 }/,
+ qr/Validation failed for 'simple_tuple' failed with value { a: 1, b: 2 }/,
'Wrong basic type';
like $simple_tuple->validate(['a','b']),
'Correctly failed due to age not an Int';
like $simple_dict->validate({name=>$simple_dict,age=>1}),
- qr/failed with value { age => 1, name => MooseX:/,
+ qr/failed with value { age: 1, name: MooseX:/,
'Correctly failed due to object not a Str';
like $simple_dict->validate({name=>'John'}),
my $optional_dict = subtype 'optional_dict', as Dict[name=>Str,age=>Optional[Int]];
like $optional_tuple->validate({a=>1,b=>2}),
- qr/Validation failed for 'optional_tuple' failed with value { a => 1, b => 2 }/,
+ qr/Validation failed for 'optional_tuple' failed with value { a: 1, b: 2 }/,
'Wrong basic type';
like $optional_tuple->validate(['a','b']),
'Correctly failed due to age not an Int';
like $optional_dict->validate({name=>$simple_dict,age=>1}),
- qr/failed with value { age => 1, name => MooseX:/,
+ qr/failed with value { age: 1, name: MooseX:/,
'Correctly failed due to object not a Str';
like $optional_dict->validate({name=>'Vincent', age=>15,extra=>'morethanIneed'}),