From: Karen Etheridge <ether@cpan.org>
Date: Wed, 6 Apr 2011 23:03:22 +0000 (-0700)
Subject: use Test::Fatal
X-Git-Tag: v0.14~10
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a2edc41946145b8b31636c39c0c1605e1adf5251;p=gitmo%2FMooseX-StrictConstructor.git

use Test::Fatal
---

diff --git a/t/instance.t b/t/instance.t
index 687b470..0cf4f5c 100644
--- a/t/instance.t
+++ b/t/instance.t
@@ -3,6 +3,7 @@ use warnings;
 
 use Test::More;
 use Test::Moose qw( with_immutable );
+use Test::Fatal;
 
 {
     package Foo;
@@ -11,11 +12,17 @@ use Test::Moose qw( with_immutable );
 }
 
 with_immutable {
-    eval { Foo->new( __INSTANCE__ => Foo->new ); };
-    ok( !$@, '__INSTANCE__ is ignored when passed to ->new' );
+    is(
+        exception { Foo->new( __INSTANCE__ => Foo->new ) },
+        undef,
+        '__INSTANCE__ is ignored when passed to ->new',
+    );
 
-    eval { Foo->meta->new_object( __INSTANCE__ => Foo->new ); };
-    ok( !$@, '__INSTANCE__ is ignored when passed to ->new_object' );
+    is(
+        exception { Foo->meta->new_object( __INSTANCE__ => Foo->new ) },
+        undef,
+        '__INSTANCE__ is ignored when passed to ->new_object',
+    );
 }
 'Foo';