X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F009_wrapped.t;h=e328b5d85dcf6c82f81b72a4ed804438ab205c67;hb=11aa63fe7e9b7293546ed09fd1ca261b4d0e9c51;hp=6547942c13c793509e55124b57012f6b12e9f0b9;hpb=d9d1529df9e8c52248cdd0bac2de23d235af3a0b;p=gitmo%2FMooseX-Params-Validate.git diff --git a/t/009_wrapped.t b/t/009_wrapped.t index 6547942..e328b5d 100644 --- a/t/009_wrapped.t +++ b/t/009_wrapped.t @@ -3,8 +3,8 @@ use strict; use warnings; -use Test::More tests => 2; -use Test::Exception; +use Test::More; +use Test::Fatal; { package Foo; @@ -15,7 +15,7 @@ use Test::Exception; my $self = shift; my %params = validated_hash( \@_, - foo => { isa => 'Str' }, + foo => { isa => 'Str' }, ); return $params{foo}; } @@ -28,9 +28,9 @@ use Test::Exception; my @args = ( bar => delete $p{bar} ); my %params = validated_hash( - \@args, - bar => { isa => 'Str' }, - ); + \@args, + bar => { isa => 'Str' }, + ); $params{bar}, $self->$orig(%p); }; @@ -43,9 +43,9 @@ use Test::Exception; my @args = ( quux => delete $p{quux} ); my %params = validated_hash( - \@args, - quux => { isa => 'Str' }, - ); + \@args, + quux => { isa => 'Str' }, + ); $params{quux}, $self->$orig(%p); }; @@ -54,12 +54,17 @@ use Test::Exception; { my $foo = Foo->new; - is_deeply( [ $foo->foo( foo => 1, bar => 2, quux => 3 ) ], - [ 3, 2, 1 ], - 'multiple around wrappers can safely be cached' ); - - is_deeply( [ $foo->foo( foo => 1, bar => 2, quux => 3 ) ], - [ 3, 2, 1 ], - 'multiple around wrappers can safely be cached (2nd time)' ); + is_deeply( + [ $foo->foo( foo => 1, bar => 2, quux => 3 ) ], + [ 3, 2, 1 ], + 'multiple around wrappers can safely be cached' + ); + + is_deeply( + [ $foo->foo( foo => 1, bar => 2, quux => 3 ) ], + [ 3, 2, 1 ], + 'multiple around wrappers can safely be cached (2nd time)' + ); } +done_testing();