override exit() in test using MooseX::Getopt
Karen Etheridge [Sun, 23 Sep 2018 23:47:44 +0000 (16:47 -0700)]
0.73 moved the exit() call outside of print_usage_text, so the test's
overridden sub no longer prevented it from being called

Changes
t/aggregate/unit_core_script_help.t

diff --git a/Changes b/Changes
index 8b19fb0..e25770d 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,7 @@
 # This file documents the revision history for Perl extension Catalyst.
 
+  - fix test for changes in MooseX::Getopt 0.73 (RT#127050)
+
 5.90118 - 2018-05-01
   - fix handling of fragments in uri_for when path is an unblessed string (GH#160)
   - ensure catalyst.pl is included with dist
index e2fc4a2..38eb5ea 100644 (file)
@@ -6,6 +6,9 @@ use Test::Fatal;
 use FindBin qw/$Bin/;
 use lib "$Bin/../lib";
 
+no warnings 'once';
+*CORE::GLOBAL::exit = sub {};
+
 {
     package TestHelpScript;
     use Moose;