requires 'Scalar::Util' => '0';
requires 'Sub::Exporter' => '0';
-build_requires 'Test::More' => '0.62';
+build_requires 'Test::More' => '0.88';
build_requires 'Test::Exception' => '0.21';
license 'Perl';
use strict;
use warnings;
-use Test::More tests => 1;
+use Test::More;
BEGIN {
# this module doesn't export to main
package Testing;
::use_ok('MooseX::Params::Validate');
}
+
+done_testing();
use strict;
use warnings;
-use Test::More tests => 35;
+use Test::More;
use Test::Exception;
{
throws_ok { $foo->quux( foo => [ 1, 2, 3, 4 ] ) }
qr/\QThe 'foo' parameter\E.+\Qsome random callback/,
'... foo parameter additional callback requires that arrayref be 0-2 elements';
+
+done_testing();
use strict;
use warnings;
-use Test::More tests => 27;
+use Test::More;
use Test::Exception;
{
throws_ok { $foo->bar( foo => $foo, baz => \( my $var ) ) }
qr/\QThe 'baz' parameter/,
'... baz requires a ArrayRef | HashRef';
+
+done_testing();
use strict;
use warnings;
-use Test::More tests => 4;
+use Test::More;
use Test::Exception;
{
}
'... successfully applied the parameter validation (look mah no cache) (just checkin)';
+done_testing();
use strict;
use warnings;
-use Test::More tests => 7;
+use Test::More;
use Test::Exception;
use Scalar::Util;
}
'... successfully applied the parameter validation (just checking)';
+done_testing();
use strict;
use warnings;
-use Test::More tests => 15;
+use Test::More;
use Test::Exception;
# Note that setting coerce => 1 for the Num type tests that we don't try to do
[ undef, undef, undef ],
'did not try to coerce non-existent parameters'
);
+
+done_testing();
use strict;
use warnings;
-use Test::More tests => 2;
+use Test::More;
use Test::Exception;
eval <<'EOF';
'loading MX::Params::Validate in a non-Moose class does not blow up'
);
ok( Foo->can('validated_hash'), 'validated_hash() sub was added to Foo package' );
+
+done_testing();
use strict;
use warnings;
-use Test::More tests => 2;
+use Test::More;
use Test::Exception;
{
ok( Foo->can('validate'), ':deprecated tag exports validate' );
ok( Foo->can('validatep'), ':deprecated tag exports validatep' );
+
+done_testing();
use strict;
use warnings;
-use Test::More tests => 31;
+use Test::More;
use Test::Exception;
{
throws_ok { $foo->bar( $foo, {}, [qw/one two three/] ) } qr/\QParameter #3/,
'... third param a ArrayRef[Int]';
+done_testing();
use strict;
use warnings;
-use Test::More tests => 2;
+use Test::More;
use Test::Exception;
{
'multiple around wrappers can safely be cached (2nd time)' );
}
+done_testing();
-use Test::More tests => 4;
+use Test::More;
use strict;
use warnings;
'to_string( padded => 1 )'
);
+done_testing();