Revert most of the conversion to Test::Fatal so we can redo it
[gitmo/Moose.git] / t / 100_bugs / 017_type_constraint_messages.t
index a8fcf10..526130d 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 
 use Test::More;
-use Test::Fatal;
+use Test::Exception;
 
 
 # RT #37569
@@ -52,21 +52,21 @@ use Test::Fatal;
 my $foo = Foo->new;
 my $obj = MyObject->new;
 
-like exception {
+throws_ok {
     $foo->ar( [] );
-},
+}
 qr/Attribute \(ar\) does not pass the type constraint because: ref: ARRAY/,
     '... got the right error message';
 
-like exception {
+throws_ok {
     $foo->obj($foo);    # Doh!
-},
+}
 qr/Attribute \(obj\) does not pass the type constraint because: Well it is an object/,
     '... got the right error message';
 
-like exception {
+throws_ok {
     $foo->nt($foo);     # scalar
-},
+}
 qr/Attribute \(nt\) does not pass the type constraint because: blessed/,
     '... got the right error message';