clean up ::Destructor
[gitmo/Moose.git] / t / 030_roles / 031_roles_applied_in_create.t
index 24d57bc..1fc3cf6 100644 (file)
@@ -3,27 +3,23 @@
 use strict;
 use warnings;
 
-use Test::More tests => 1;
-use Test::Exception;
+use Test::More;
+use Test::Fatal;
 use Moose::Meta::Class;
 use Moose::Util;
 
 use lib 't/lib', 'lib';
 
 
-# Note that this test passes if we inline the role definitions in this
-# file, and it passes now that Class::MOP::load_class was changed to
-# do eval "require $module" rather than loading the module by
-# path. Perl is a strange beast.
-lives_ok(
-    sub {
-        my $builder_meta = Moose::Meta::Class->create(
-            'YATTA' => (
-                superclass => 'Moose::Meta::Class',
-                roles      => [qw( Role::Interface Role::Child )],
-            )
-        );
-    },
-    'Create a new class with several roles'
-);
+# Note that this test passed (pre svn #5543) if we inlined the role
+# definitions in this file, as it was very timing sensitive.
+is( exception {
+    my $builder_meta = Moose::Meta::Class->create(
+        'YATTA' => (
+            superclass => 'Moose::Meta::Class',
+            roles      => [qw( Role::Interface Role::Child )],
+        )
+    );
+}, undef, 'Create a new class with several roles' );
 
+done_testing;