diff options
author | Jesse Luehrs <doy@tozt.net> | 2012-10-14 16:05:32 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2012-10-14 16:05:32 -0500 |
commit | b20f7783d7ff7d0b5f2fff8f3b4203dd5ef1879d (patch) | |
tree | 3d404816eac5895641ea388e8559a4f0fd603651 | |
parent | c072c0248a39b8fedeee50e48c9b73611e38f412 (diff) | |
download | moosex-validation-doctypes-b20f7783d7ff7d0b5f2fff8f3b4203dd5ef1879d.tar.gz moosex-validation-doctypes-b20f7783d7ff7d0b5f2fff8f3b4203dd5ef1879d.zip |
relax this test a bit
-rw-r--r-- | t/stringify.t | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/t/stringify.t b/t/stringify.t index c8db5a4..0925c84 100644 --- a/t/stringify.t +++ b/t/stringify.t @@ -17,15 +17,17 @@ doctype 'Person' => { my $person = find_type_constraint('Person'); my $errors = $person->validate({ foo => "bar" }); - is( + like( "$errors", - "invalid value undef for 'id'\n" - . "invalid value undef for 'name'\n" - . "invalid value undef for 'title'\n" - . "extra data found:\n" - . "{\n" - . " 'foo' => 'bar'\n" - . "}", + qr[ + invalid\ value\ undef\ for\ 'id' \n + invalid\ value\ undef\ for\ 'name' \n + invalid\ value\ undef\ for\ 'title' \n + extra\ data\ found: \n + \s* { \s* + 'foo' \s* => \s* 'bar' \s* + \s* } + ]x, "stringified properly" ); } |