Revert most of the conversion to Test::Fatal so we can redo it
[gitmo/Moose.git] / t / 030_roles / 001_meta_role.t
index 568307f..2a040f3 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 
 use Test::More;
-use Test::Fatal;
+use Test::Exception;
 
 use Moose::Meta::Role;
 use Moose::Util::TypeConstraints ();
@@ -45,9 +45,9 @@ is_deeply(
 
 ok(!$foo_role->has_attribute('bar'), '... FooRole does not have the bar attribute');
 
-ok ! exception {
+lives_ok {
     $foo_role->add_attribute('bar' => (is => 'rw', isa => 'Foo'));
-}, '... added the bar attribute okay';
+} '... added the bar attribute okay';
 
 is_deeply(
     [ $foo_role->get_attribute_list() ],
@@ -66,9 +66,9 @@ is(
     'bar has a Foo class type'
 );
 
-ok ! exception {
+lives_ok {
     $foo_role->add_attribute('baz' => (is => 'ro'));
-}, '... added the baz attribute okay';
+} '... added the baz attribute okay';
 
 is_deeply(
     [ sort $foo_role->get_attribute_list() ],
@@ -81,9 +81,9 @@ my $baz = $foo_role->get_attribute('baz');
 is_deeply( $baz->original_options, { is => 'ro' },
     'original options for baz attribute' );
 
-ok ! exception {
+lives_ok {
     $foo_role->remove_attribute('bar');
-}, '... removed the bar attribute okay';
+} '... removed the bar attribute okay';
 
 is_deeply(
     [ $foo_role->get_attribute_list() ],
@@ -98,9 +98,9 @@ ok($foo_role->has_attribute('baz'), '... FooRole does still have the baz attribu
 ok(!$foo_role->has_before_method_modifiers('boo'), '... no boo:before modifier');
 
 my $method = sub { "FooRole::boo:before" };
-ok ! exception {
+lives_ok {
     $foo_role->add_before_method_modifier('boo' => $method);
-}, '... added a method modifier okay';
+} '... added a method modifier okay';
 
 ok($foo_role->has_before_method_modifiers('boo'), '... now we have a boo:before modifier');
 is(($foo_role->get_before_method_modifiers('boo'))[0], $method, '... got the right method back');