a bit more refactoring
[gitmo/Class-MOP.git] / t / 074_immutable_custom_trait.t
index 804c8a5..96ac773 100644 (file)
@@ -1,8 +1,8 @@
 use strict;
 use warnings;
 
-use Test::More tests => 4;
-use Test::Exception;
+use Test::More;
+use Test::Fatal;
 
 use Class::MOP;
 
@@ -12,7 +12,6 @@ use Class::MOP;
 
     use strict;
     use warnings;
-    use metaclass;
 
     use base 'Class::MOP::Class';
 
@@ -62,8 +61,7 @@ use Class::MOP;
 
     __PACKAGE__->meta->add_attribute('bar');
 
-    ::lives_ok { __PACKAGE__->meta->make_immutable }
-        'can safely make a class immutable when it has a custom metaclass and immutable trait';
+    ::is( ::exception { __PACKAGE__->meta->make_immutable }, undef, 'can safely make a class immutable when it has a custom metaclass and immutable trait' );
 }
 
 {
@@ -74,3 +72,5 @@ use Class::MOP;
         'Bar->meta->superclasses returns expected value after immutabilization'
     );
 }
+
+done_testing;