make inlining a bit more easily extensible
[gitmo/Class-MOP.git] / t / 006_new_and_clone_metaclasses.t
index b64119d..4b655ac 100644 (file)
@@ -1,17 +1,13 @@
-#!/usr/bin/perl
-
 use strict;
 use warnings;
 
 use FindBin;
 use File::Spec::Functions;
 
-use Test::More tests => 36;
-use Test::Exception;
+use Test::More;
+use Test::Fatal;
 
-BEGIN {
-    use_ok('Class::MOP');
-}
+use Class::MOP;
 
 use lib catdir($FindBin::Bin, 'lib');
 
@@ -104,9 +100,9 @@ isnt($cloned_foo, $foo, '... $cloned_foo is a new object different from $foo');
 
 # check some errors
 
-dies_ok {
+isnt( exception {
     $foo_meta->clone_object($meta);
-} '... this dies as expected';
+}, undef, '... this dies as expected' );
 
 # test stuff
 
@@ -128,3 +124,4 @@ is($attr->associated_class,
    $attr_clone->associated_class,
    '... we successfully did not clone our associated metaclass');
 
+done_testing;