Redid conversion to Test::Fatal
[gitmo/Moose.git] / t / 040_type_constraints / 029_define_type_twice_throws.t
index 190f123..6cc05ed 100644 (file)
@@ -3,8 +3,8 @@
 use strict;
 use warnings;
 
-use Test::More tests => 2;
-use Test::Exception;
+use Test::More;
+use Test::Fatal;
 
 BEGIN {
     use_ok('Moose::Util::TypeConstraints');
@@ -17,10 +17,11 @@ BEGIN {
     subtype 'MySubType' => as 'Int' => where { 1 };
 }
 
-throws_ok {
+like( exception {
     package Some::Other::Class;
     use Moose::Util::TypeConstraints;
 
     subtype 'MySubType' => as 'Int' => where { 1 };
-} qr/cannot be created again/, 'Trying to create same type twice throws';
+}, qr/cannot be created again/, 'Trying to create same type twice throws' );
 
+done_testing;