X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Faggregate%2Funit_core_script_server.t;h=222098a7d8923d2acf0ead1d38fd9c6fc680a331;hb=5a39616b06890f0f52089a93a0714159ee2066ec;hp=c75cec6acb3f89339858f7bccb35e3d06cd338fa;hpb=56eb9db4b0212aa51e034eb1a9c4bfef46c4ae00;p=catagits%2FCatalyst-Runtime.git diff --git a/t/aggregate/unit_core_script_server.t b/t/aggregate/unit_core_script_server.t index c75cec6..222098a 100644 --- a/t/aggregate/unit_core_script_server.t +++ b/t/aggregate/unit_core_script_server.t @@ -79,6 +79,19 @@ testRestart( ['-r', '--restart_directory', 'root'], restartopthash(directories = testRestart( ['-r', '--rr', 'foo'], restartopthash(filter => qr/foo/) ); testRestart( ['-r', '--restart_regex', 'foo'], restartopthash(filter => qr/foo/) ); +local $ENV{TESTAPPTOTESTSCRIPTS_RESTARTER}; +local $ENV{CATALYST_RESTARTER}; +{ + is _build_testapp([])->restarter_class, 'Catalyst::Restarter', 'default restarter with no $ENV{CATALYST_RESTARTER}'; +} +{ + local $ENV{CATALYST_RESTARTER} = "CatalystX::Restarter::Other"; + is _build_testapp([])->restarter_class, $ENV{CATALYST_RESTARTER}, 'override restarter with $ENV{CATALYST_RESTARTER}'; +} +{ + local $ENV{TESTAPPTOTESTSCRIPTS_RESTARTER} = "CatalystX::Restarter::Other2"; + is _build_testapp([])->restarter_class, $ENV{TESTAPPTOTESTSCRIPTS_RESTARTER}, 'override restarter with $ENV{TESTAPPTOTESTSCRIPTS_RESTARTER}'; +} done_testing; sub testOption { @@ -89,6 +102,8 @@ sub testOption { }; # First element of RUN_ARGS will be the script name, which we don't care about shift @TestAppToTestScripts::RUN_ARGS; + # Mangle argv into the options.. + $resultarray->[-1]->{argv} = $argstring; is_deeply \@TestAppToTestScripts::RUN_ARGS, $resultarray, "is_deeply comparison " . join(' ', @$argstring); } @@ -128,8 +143,13 @@ sub opthash { } sub restartopthash { - return { - follow_symlinks => 0, - @_, + my $opthash = opthash(@_); + my $val = { + application_name => 'TestAppToTestScripts', + port => '3000', + debug => undef, + host => undef, + %$opthash, }; + return $val; }