X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Faggregate%2Funit_core_script_server.t;fp=t%2Faggregate%2Funit_core_script_server.t;h=f298fa9a202645a4b51043f64c62800518eca3e3;hb=99dabb12e4a28209766f7d06d976ec265a06f905;hp=0623cfe114120d7213f29293fc65dc7c49173d89;hpb=ce616b55dfe42513400a5881614da857a7d6d767;p=catagits%2FCatalyst-Runtime.git diff --git a/t/aggregate/unit_core_script_server.t b/t/aggregate/unit_core_script_server.t index 0623cfe..f298fa9 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 { @@ -132,8 +145,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; }