Revert most of the conversion to Test::Fatal so we can redo it
[gitmo/Moose.git] / t / 040_type_constraints / 027_parameterize_from.t
index f815745..beab5b8 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 
 use Test::More;
-use Test::Fatal;
+use Test::Exception;
 
 BEGIN {
     use_ok('Moose::Util::TypeConstraints');
@@ -43,38 +43,38 @@ isa_ok $params, 'Test::Moose::Meta::TypeConstraint::Parameterizable' =>
 
 # test parameterizable
 
-ok ! exception {
+lives_ok sub {
     $params->parameterizable( { a => 'Hello', b => 'World' } );
-}, => 'No problem setting parameterizable';
+} => 'No problem setting parameterizable';
 
 is_deeply $params->parameterizable,
     { a => 'Hello', b => 'World' } => 'Got expected values';
 
 # test parameterized
 
-ok ! exception {
+lives_ok sub {
     $params->parameterized( { a => 1, b => 2 } );
-}, => 'No problem setting parameterized';
+} => 'No problem setting parameterized';
 
 is_deeply $params->parameterized, { a => 1, b => 2 } => 'Got expected values';
 
-like exception {
+throws_ok sub {
     $params->parameterized( { a => 'Hello', b => 'World' } );
-    },, qr/Attribute \(parameterized\) does not pass the type constraint/ =>
+    }, qr/Attribute \(parameterized\) does not pass the type constraint/ =>
     'parameterized throws expected error';
 
 # test from_parameterizable
 
-ok ! exception {
+lives_ok sub {
     $params->from_parameterizable( { a => 1, b => 2 } );
-}, => 'No problem setting from_parameterizable';
+} => 'No problem setting from_parameterizable';
 
 is_deeply $params->from_parameterizable,
     { a => 1, b => 2 } => 'Got expected values';
 
-like exception {
+throws_ok sub {
     $params->from_parameterizable( { a => 'Hello', b => 'World' } );
-    },,
+    },
     qr/Attribute \(from_parameterizable\) does not pass the type constraint/
     => 'from_parameterizable throws expected error';