From: Karen Etheridge Date: Sun, 11 Mar 2012 18:05:29 +0000 (-0700) Subject: better test descriptions X-Git-Tag: 0.13~15 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4f5c4e45d081ff1cd489145b1f2e43a163387e0c;p=gitmo%2FMooseX-UndefTolerant.git better test descriptions --- diff --git a/t/lib/ConstructorTests.pm b/t/lib/ConstructorTests.pm index 340e2f7..3425d7a 100644 --- a/t/lib/ConstructorTests.pm +++ b/t/lib/ConstructorTests.pm @@ -56,7 +56,8 @@ use Test::Fatal; sub do_tests { - note 'Testing class with a single UndefTolerant attribute'; + note 'Testing ', (Foo->meta->is_immutable ? 'im' : '') . 'mutable ', + 'class with a single UndefTolerant attribute'; { my $obj = Foo->new; ok(!$obj->has_attr1, 'attr1 has no value before it is assigned'); @@ -82,7 +83,8 @@ sub do_tests ok($obj->has_attr3, 'attr3 retains its undef value when assigned undef in constructor'); }, undef, - 'successfully tested spot-applicaction of UT trait in immutable classes', + 'successfully tested spot-application of UT trait in ' + . (Foo->meta->is_immutable ? 'im' : '') . 'mutable classes', ); } @@ -98,9 +100,10 @@ sub do_tests ok($obj->has_attr3, '...and the predicate returns true as normal'); } - note ''; - note 'Testing class with the entire class being UndefTolerant'; + note 'Testing class with the entire ', + (Foo->meta->is_immutable ? 'im' : '') . 'mutable ', + 'class being UndefTolerant'; { my $obj = Bar->new; ok(!$obj->has_attr1, 'attr1 has no value before it is assigned');