Standardize use of Test::Exception before converting to Test::Fatal
[gitmo/Moose.git] / t / 300_immutable / 013_immutable_roundtrip.t
index f516cc1..a77b223 100644 (file)
@@ -5,10 +5,9 @@ use warnings;
 
 use Test::More;
 
-eval "use Test::Output";
-plan skip_all => "Test::Output is required for this test" if $@;
-
-plan tests => 1;
+use Test::Requires {
+    'Test::Output' => '0.01', # skip all if not installed
+};
 
 {
     package Foo;
@@ -25,6 +24,10 @@ plan tests => 1;
     __PACKAGE__->meta->make_immutable;
     __PACKAGE__->meta->make_mutable;
 
+
+    # This actually is testing for a bug in Class::MOP that cause
+    # Moose::Meta::Method::Constructor to spit out a warning when it
+    # shouldn't have done so. The bug was fixed in CMOP 0.75.
     ::stderr_unlike(
         sub { Bar->meta->make_immutable },
         qr/Not inlining a constructor/,
@@ -32,3 +35,4 @@ plan tests => 1;
     );
 }
 
+done_testing;