fix typo in docs: . instead of ;
[gitmo/Moose.git] / t / 040_type_constraints / 027_parameterize_from.t
index f815745..3e97310 100644 (file)
@@ -43,39 +43,36 @@ isa_ok $params, 'Test::Moose::Meta::TypeConstraint::Parameterizable' =>
 
 # test parameterizable
 
-ok ! exception {
+is( exception {
     $params->parameterizable( { a => 'Hello', b => 'World' } );
-}, => 'No problem setting parameterizable';
+}, undef, 'No problem setting parameterizable' );
 
 is_deeply $params->parameterizable,
     { a => 'Hello', b => 'World' } => 'Got expected values';
 
 # test parameterized
 
-ok ! exception {
+is( exception {
     $params->parameterized( { a => 1, b => 2 } );
-}, => 'No problem setting parameterized';
+}, undef, 'No problem setting parameterized' );
 
 is_deeply $params->parameterized, { a => 1, b => 2 } => 'Got expected values';
 
-like exception {
+like( exception {
     $params->parameterized( { a => 'Hello', b => 'World' } );
-    },, qr/Attribute \(parameterized\) does not pass the type constraint/ =>
-    'parameterized throws expected error';
+    }, qr/Attribute \(parameterized\) does not pass the type constraint/, 'parameterized throws expected error' );
 
 # test from_parameterizable
 
-ok ! exception {
+is( exception {
     $params->from_parameterizable( { a => 1, b => 2 } );
-}, => 'No problem setting from_parameterizable';
+}, undef, 'No problem setting from_parameterizable' );
 
 is_deeply $params->from_parameterizable,
     { a => 1, b => 2 } => 'Got expected values';
 
-like exception {
+like( exception {
     $params->from_parameterizable( { a => 'Hello', b => 'World' } );
-    },,
-    qr/Attribute \(from_parameterizable\) does not pass the type constraint/
-    => 'from_parameterizable throws expected error';
+    }, qr/Attribute \(from_parameterizable\) does not pass the type constraint/, 'from_parameterizable throws expected error' );
 
 done_testing;