From: Dave Rolsky Date: Mon, 8 Sep 2008 14:42:05 +0000 (+0000) Subject: Add a plan and tidied the code a little X-Git-Tag: 0.58~44 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=21256595fc52a822c3f48aed7bd7b1a4dc59495c;p=gitmo%2FMoose.git Add a plan and tidied the code a little --- diff --git a/t/100_bugs/017_type_constraint_messages.t b/t/100_bugs/017_type_constraint_messages.t index 0f18e53..eecfad5 100644 --- a/t/100_bugs/017_type_constraint_messages.t +++ b/t/100_bugs/017_type_constraint_messages.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More "no_plan"; +use Test::More tests => 3; use Test::Exception; @@ -53,16 +53,21 @@ use Test::Exception; my $foo = Foo->new; my $obj = MyObject->new; -throws_ok { - $foo->ar([]); -} qr/Attribute \(ar\) does not pass the type constraint because: ref: ARRAY/, '... got the right error message'; - -throws_ok { - $foo->obj($foo); # Doh! -} qr/Attribute \(obj\) does not pass the type constraint because: Well it is an object/, '... got the right error message'; +throws_ok { + $foo->ar( [] ); +} +qr/Attribute \(ar\) does not pass the type constraint because: ref: ARRAY/, + '... got the right error message'; -throws_ok { - $foo->nt($foo); # scalar -} qr/Attribute \(nt\) does not pass the type constraint because: blessed/, '... got the right error message'; +throws_ok { + $foo->obj($foo); # Doh! +} +qr/Attribute \(obj\) does not pass the type constraint because: Well it is an object/, + '... got the right error message'; +throws_ok { + $foo->nt($foo); # scalar +} +qr/Attribute \(nt\) does not pass the type constraint because: blessed/, + '... got the right error message';