clean up ::Destructor
[gitmo/Moose.git] / t / 030_roles / 043_conflict_many_methods.t
index 94f730f..f016fb0 100644 (file)
@@ -2,8 +2,8 @@
 use strict;
 use warnings;
 
-use Test::More tests => 2;
-use Test::Exception;
+use Test::More;
+use Test::Fatal;
 
 {
     package Bomb;
@@ -29,17 +29,20 @@ use Test::Exception;
     sub bark { }
 }
 
-package PracticalJoke;
-use Moose;
-
-::throws_ok {
-    with 'Bomb', 'Spouse';
-} qr/Due to method name conflicts in roles 'Bomb' and 'Spouse', the methods 'explode' and 'fuse' must be implemented or excluded by 'PracticalJoke'/;
-
-::throws_ok {
-    with (
-        'Bomb', 'Spouse',
-        'Caninish', 'Treeve',
-    );
-} qr/Due to method name conflicts in roles 'Bomb' and 'Spouse', the methods 'explode' and 'fuse' must be implemented or excluded by 'PracticalJoke'/;
+{
+    package PracticalJoke;
+    use Moose;
+
+    ::like( ::exception {
+        with 'Bomb', 'Spouse';
+    }, qr/Due to method name conflicts in roles 'Bomb' and 'Spouse', the methods 'explode' and 'fuse' must be implemented or excluded by 'PracticalJoke'/ );
+
+    ::like( ::exception {
+        with (
+            'Bomb', 'Spouse',
+            'Caninish', 'Treeve',
+        );
+    }, qr/Due to a method name conflict in roles 'Caninish' and 'Treeve', the method 'bark' must be implemented or excluded by 'PracticalJoke'/ );
+}
 
+done_testing;