Cleanup and some moar tests
[catagits/Catalyst-Runtime.git] / t / aggregate / unit_core_script_help.t
CommitLineData
4f0612fd 1#!/usr/bin/env perl
2use strict;
3use warnings;
4use Test::More;
5
6use FindBin qw/$Bin/;
7use lib "$Bin/../lib";
8
9{
10 package TestHelpScript;
11 use Moose;
12 with 'Catalyst::ScriptRole';
13 our $help;
14 sub _exit_with_usage { $help++ }
15}
16{
17 local $TestHelpScript::help;
18 local @ARGV = ('-h');
19 TestHelpFromScriptCGI->new_with_options(application_name => 'TestAppToTestScripts')->run;
20 ok $TestHelpFromScriptCGI::help, 1;
21}
22{
23 local $TestHelpScript::help;
24 local @ARGV = ('--help');
25 TestHelpFromScriptCGI->new_with_options(application_name => 'TestAppToTestScripts')->run;
26 is $TestHelpFromScriptCGI::help, 2;
27}
28
29done_testing;