Redid conversion to Test::Fatal
[gitmo/Moose.git] / lib / Moose / Cookbook / Basics / Recipe5.pod
index 45de2c4..7a6f3ed 100644 (file)
@@ -257,25 +257,35 @@ isa_ok( $r, 'Request' );
     is( $header4->content_type, 'application/pdf',
         '... got the right content type in the header' );
 
-    ok exception {
-        $r->headers('Foo');
-    },
-    '... dies when it gets bad params';
+    isnt(
+        exception {
+            $r->headers('Foo');
+        },
+        undef,
+        '... dies when it gets bad params'
+    );
 }
 
 {
     is( $r->protocol, undef, '... got nothing by default' );
 
-    ok ! exception {
-        $r->protocol('HTTP/1.0');
-    },
-    '... set the protocol correctly';
+    is(
+        exception {
+            $r->protocol('HTTP/1.0');
+        },
+        undef,
+        '... set the protocol correctly'
+    );
+
     is( $r->protocol, 'HTTP/1.0', '... got nothing by default' );
 
-    ok exception {
-        $r->protocol('http/1.0');
-    },
-    '... the protocol died with bar params correctly';
+    isnt(
+        exception {
+            $r->protocol('http/1.0');
+        },
+        undef,
+        '... the protocol died with bar params correctly'
+    );
 }
 
 {