From: Shawn M Moore Date: Mon, 22 Dec 2008 04:26:31 +0000 (+0000) Subject: Better test here; check the error message X-Git-Tag: 0.19~75 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=108a7c181afe5b943e3244a99dd59beee351f3d7;p=gitmo%2FMouse.git Better test here; check the error message --- diff --git a/t/800_shikabased/010-isa-or.t b/t/800_shikabased/010-isa-or.t index 0ede006..0b42f5c 100644 --- a/t/800_shikabased/010-isa-or.t +++ b/t/800_shikabased/010-isa-or.t @@ -14,7 +14,7 @@ use Test::More tests => 18; eval { Foo->new( bar => +{} ); }; -ok $@, 'not got an object'; +like($@, qr/^Attribute \(bar\) does not pass the type constraint because: Validation failed for 'Str\|Baz\|Undef' failed with value HASH\(\w+\)/, 'type constraint and coercion failed'); eval { isa_ok(Foo->new( bar => undef ), 'Foo');