[Moose-commits] r7974 - MooseX-Params-Validate/trunk/t

autarch at code2.0beta.co.uk autarch at code2.0beta.co.uk
Sun Nov 29 16:35:39 GMT 2009


Author: autarch
Date: 2009-11-29 08:35:38 -0800 (Sun, 29 Nov 2009)
New Revision: 7974

Modified:
   MooseX-Params-Validate/trunk/t/005_coercion.t
Log:
Clarify why coerce => 1 is set for the Num type parameter


Modified: MooseX-Params-Validate/trunk/t/005_coercion.t
===================================================================
--- MooseX-Params-Validate/trunk/t/005_coercion.t	2009-11-29 12:33:59 UTC (rev 7973)
+++ MooseX-Params-Validate/trunk/t/005_coercion.t	2009-11-29 16:35:38 UTC (rev 7974)
@@ -6,6 +6,8 @@
 use Test::More tests => 11;
 use Test::Exception;
 
+# Note that setting coerce => 1 for the Num type tests that we don't try to do
+# coercions for a type which doesn't have any coercions.
 {
     package Foo;
     use Moose;
@@ -85,7 +87,7 @@
 
 throws_ok { $foo->bar( size1 => 30, size2 => 10, number => 'something' ) }
 qr/\QThe 'number' parameter/,
-    '... the number param cannot be coerced';
+    '... the number param cannot be coerced because there is no coercion defined for Num';
 
 is_deeply(
     $foo->baz( size1 => 10, size2 => 20, number => 30 ),




More information about the Moose-commits mailing list