Revert most of the conversion to Test::Fatal so we can redo it
[gitmo/Moose.git] / t / 200_examples / 004_example_w_DCS.t
index 2b1168f..671781c 100644 (file)
@@ -18,7 +18,7 @@ use Test::Requires {
     'Declare::Constraints::Simple' => '0.01', # skip all if not installed
 };
 
-use Test::Fatal;
+use Test::Exception;
 
 {
     package Foo;
@@ -58,35 +58,35 @@ my $hash_of_arrays_of_objs = {
 my $array_of_ints = [ 1 .. 10 ];
 
 my $foo;
-ok ! exception {
+lives_ok {
     $foo = Foo->new(
        'bar' => $hash_of_arrays_of_objs,
        'baz' => $array_of_ints,
     );
-}, '... construction succeeded';
+} '... construction succeeded';
 isa_ok($foo, 'Foo');
 
 is_deeply($foo->bar, $hash_of_arrays_of_objs, '... got our value correctly');
 is_deeply($foo->baz, $array_of_ints, '... got our value correctly');
 
-ok exception {
+dies_ok {
     $foo->bar([]);
-}, '... validation failed correctly';
+} '... validation failed correctly';
 
-ok exception {
+dies_ok {
     $foo->bar({ foo => 3 });
-}, '... validation failed correctly';
+} '... validation failed correctly';
 
-ok exception {
+dies_ok {
     $foo->bar({ foo => [ 1, 2, 3 ] });
-}, '... validation failed correctly';
+} '... validation failed correctly';
 
-ok exception {
+dies_ok {
     $foo->baz([ "foo" ]);
-}, '... validation failed correctly';
+} '... validation failed correctly';
 
-ok exception {
+dies_ok {
     $foo->baz({});
-}, '... validation failed correctly';
+} '... validation failed correctly';
 
 done_testing;