Standardize use of Test::Exception before converting to Test::Fatal
[gitmo/Moose.git] / t / 040_type_constraints / 021_maybe_type_constraint.t
index 4974e09..bfa8991 100644 (file)
@@ -121,14 +121,14 @@ ok sub {$obj->Maybe_Int(undef); 1}->()
 ok !$Maybe_Int->check("")
  => 'failed ("")';
 
-throws_ok sub { $obj->Maybe_Int("") },
+throws_ok { $obj->Maybe_Int("") }
  qr/Attribute \(Maybe_Int\) does not pass the type constraint/
  => 'failed assigned ("")';
 
 ok !$Maybe_Int->check("a")
  => 'failed ("a")';
 
-throws_ok sub { $obj->Maybe_Int("a") },
+throws_ok { $obj->Maybe_Int("a") }
  qr/Attribute \(Maybe_Int\) does not pass the type constraint/
  => 'failed assigned ("a")';