X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Ftype_constraints%2Fclass_subtypes.t;h=33b21e5114fa268d4daf7d44d3300ac948b83786;hb=5a18346bf3bb376bf1ee3fab06043bb9c8bc6081;hp=c5839c08f697c0a643ef280b7533246be5610dc5;hpb=829433c47061dd70a608bfcd940113c4172b6950;p=gitmo%2FMoose.git diff --git a/t/type_constraints/class_subtypes.t b/t/type_constraints/class_subtypes.t index c5839c0..33b21e5 100644 --- a/t/type_constraints/class_subtypes.t +++ b/t/type_constraints/class_subtypes.t @@ -80,10 +80,10 @@ ok $isa_foo, 'Created subtype of Foo type'; ok $isa_foo->check( Foo->new ), 'Foo passes check'; ok $isa_foo->check( Bar->new ), 'Bar passes check'; ok ! $isa_foo->check( Baz->new ), 'Baz does not pass check'; -like $foo->get_message( Baz->new ), qr/^Validation failed for 'Foo' with value Baz=HASH\(0x\w+\) \(not isa Foo\)/, 'Better validation message'; +like $foo->get_message( Baz->new ), qr/^Validation failed for 'Foo' with value .*Baz.* \(not isa Foo\)/, 'Better validation message'; # Maybe in the future this *should* inherit? -like $isa_foo->get_message( Baz->new ), qr/^Validation failed for 'IsaFoo' with value Baz=HASH\(0x\w+\)$/, "Subtypes do not automatically inherit parent type's message"; +like $isa_foo->get_message( Baz->new ), qr/^Validation failed for 'IsaFoo' with value .*Baz.*/, "Subtypes do not automatically inherit parent type's message"; # Implicit types