From: Tomas Doran (t0m) Date: Fri, 6 Nov 2009 13:33:03 +0000 (+0000) Subject: Fix test fails with new Devel::PartialDump X-Git-Tag: 0.19~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMooseX-Types-Structured.git;a=commitdiff_plain;h=68d0710ba681a67640606b965dc5756de252c8c1 Fix test fails with new Devel::PartialDump --- diff --git a/Changes b/Changes index 4ec48a7..462ba7f 100644 --- 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 diff --git a/Makefile.PL b/Makefile.PL index ea4fd7f..5174b1d 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -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 diff --git a/lib/MooseX/Types/Structured.pm b/lib/MooseX/Types/Structured.pm index ca9f0ff..6baf782 100644 --- a/lib/MooseX/Types/Structured.pm +++ b/lib/MooseX/Types/Structured.pm @@ -867,6 +867,7 @@ Copyright & license information included below: Florian Ragwitz, Yuval Kogman, + Tomas Doran, =head1 COPYRIGHT & LICENSE diff --git a/t/12-error.t b/t/12-error.t index 2c3ca14..d66cd61 100644 --- a/t/12-error.t +++ b/t/12-error.t @@ -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'}),