use strict;
use warnings;
-use Test::More tests => 85;
+use Test::More;
use Test::Exception;
use Scalar::Util ();
ok(!defined($natural->validate(5)), '... validated successfully (no error)');
is($natural->validate(-5),
- "Validation failed for 'Natural' failed with value -5",
+ "Validation failed for 'Natural' with value -5",
'... validated unsuccessfully (got error)');
my $string = find_type_constraint('String');
# sugar was indistinguishable from calling directly.
{
+ no warnings 'redefine';
+ *Moose::Deprecated::deprecated = sub { return };
+}
+
+{
my $type = type( 'Number2', sub { Scalar::Util::looks_like_number($_) } );
ok( $type->check(5), '... this is a Num' );
ok( ! $subtype->check('Foo'), '... this is not a Natural');
}
+done_testing;