work with MooseX::Getopt 0.48 by using the new public method for printing usage
[catagits/Catalyst-Runtime.git] / t / aggregate / unit_core_script_help.t
index 2b6530a..00d24da 100644 (file)
@@ -11,26 +11,20 @@ use lib "$Bin/../lib";
     package TestHelpScript;
     use Moose;
     with 'Catalyst::ScriptRole';
-    __PACKAGE__->meta->get_attribute('help')->cmd_aliases('h');
     our $help;
-    sub _exit_with_usage { $help++ }
+    sub print_usage_text { $help++ }
 }
 
-test('-h');
 test('--help');
-
-TODO: {
-    local $TODO = 'This is bork';
-    test('-?');
-}
+test('-?');
 
 sub test {
     local $TestHelpScript::help;
     local @ARGV = (@_);
     lives_ok {
         TestHelpScript->new_with_options(application_name => 'TestAppToTestScripts')->run;
-    };
-    ok $TestHelpScript::help;
+    } 'Lives';
+    ok $TestHelpScript::help, 'Got help';
 }
 
 done_testing;