Revert most of the conversion to Test::Fatal so we can redo it
[gitmo/Moose.git] / t / 040_type_constraints / 001_util_type_constraints.t
index b0e6069..c7c611e 100644 (file)
@@ -104,7 +104,7 @@ ok(!$natural->has_message, '... it does not have a message');
 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');
@@ -194,6 +194,11 @@ throws_ok {$r->add_type_constraint(bless {}, 'SomeClass')} qr/not a valid type c
 # 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' );