Fix test fails with new Devel::PartialDump
Tomas Doran (t0m) [Fri, 6 Nov 2009 13:33:03 +0000 (13:33 +0000)]
Changes
Makefile.PL
lib/MooseX/Types/Structured.pm
t/12-error.t

diff --git a/Changes b/Changes
index 4ec48a7..462ba7f 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,8 @@
 Revision history for MooseX-Types-Structured
 
+        - Require Devel::PartialDump 0.10 and change tests to expect the
+          correct format of error.
+
 0.18   17 August 2009
         - Changed the Makefile.PL to reduce dependencies not needed by users
           that are not authors.  Bumped the revision and released to clear an
index ea4fd7f..5174b1d 100644 (file)
@@ -10,7 +10,7 @@ license 'perl';
 ## Module dependencies
 requires 'Moose' => '0.63';
 requires 'MooseX::Types' => '0.08';
-requires 'Devel::PartialDump' => '0.07';
+requires 'Devel::PartialDump' => '0.10';
 requires 'Sub::Exporter' => '0.982';
 
 ## Testing dependencies
index ca9f0ff..6baf782 100644 (file)
@@ -867,6 +867,7 @@ Copyright & license information included below:
 
     Florian Ragwitz, <rafl@debian.org>
     Yuval Kogman, <nothingmuch@woobling.org>
+    Tomas Doran, <bobtfish@bobtfish.net>
 
 =head1 COPYRIGHT & LICENSE
 
index 2c3ca14..d66cd61 100644 (file)
@@ -23,7 +23,7 @@ ok !$simple_dict->check({name=>$simple_dict,age=>'hello'}), "simple_dict fails:
 ## Let's check all the expected validation errors for tuple
 
 like $simple_tuple->validate({a=>1,b=>2}),
- qr/Validation failed for 'simple_tuple' failed with value { a => 1, b => 2 }/,
+ qr/Validation failed for 'simple_tuple' failed with value { a: 1, b: 2 }/,
  'Wrong basic type';
 
 like $simple_tuple->validate(['a','b']),
@@ -53,7 +53,7 @@ like $simple_dict->validate({name=>'John',age=>'a'}),
  'Correctly failed due to age not an Int';
  
 like $simple_dict->validate({name=>$simple_dict,age=>1}),
- qr/failed with value { age => 1, name => MooseX:/,
+ qr/failed with value { age: 1, name: MooseX:/,
  'Correctly failed due to object not a Str';
 
 like $simple_dict->validate({name=>'John'}),
@@ -70,7 +70,7 @@ like $simple_dict->validate({name=>'Vincent', age=>15,extra=>'morethanIneed'}),
  my $optional_dict = subtype 'optional_dict', as Dict[name=>Str,age=>Optional[Int]];
  
  like $optional_tuple->validate({a=>1,b=>2}),
- qr/Validation failed for 'optional_tuple' failed with value { a => 1, b => 2 }/,
+ qr/Validation failed for 'optional_tuple' failed with value { a: 1, b: 2 }/,
  'Wrong basic type';
 
 like $optional_tuple->validate(['a','b']),
@@ -94,7 +94,7 @@ like $optional_dict->validate({name=>'John',age=>'a'}),
  'Correctly failed due to age not an Int';
  
 like $optional_dict->validate({name=>$simple_dict,age=>1}),
- qr/failed with value { age => 1, name => MooseX:/,
+ qr/failed with value { age: 1, name: MooseX:/,
  'Correctly failed due to object not a Str';
 
 like $optional_dict->validate({name=>'Vincent', age=>15,extra=>'morethanIneed'}),