Release commit for 5.90128
[catagits/Catalyst-Runtime.git] / t / aggregate / unit_core_script_help.t
index 00d24da..38eb5ea 100644 (file)
@@ -1,12 +1,14 @@
-#!/usr/bin/env perl
 use strict;
 use warnings;
 use Test::More;
-use Test::Exception;
+use Test::Fatal;
 
 use FindBin qw/$Bin/;
 use lib "$Bin/../lib";
 
+no warnings 'once';
+*CORE::GLOBAL::exit = sub {};
+
 {
     package TestHelpScript;
     use Moose;
@@ -21,9 +23,9 @@ test('-?');
 sub test {
     local $TestHelpScript::help;
     local @ARGV = (@_);
-    lives_ok {
+    is exception {
         TestHelpScript->new_with_options(application_name => 'TestAppToTestScripts')->run;
-    } 'Lives';
+    }, undef, 'Lives';
     ok $TestHelpScript::help, 'Got help';
 }