X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Faggregate%2Funit_core_script_server-without_modules.t;h=d6bbcaff960c1ed2183f3126b40d919f0f52a917;hp=0fdaa872f8b2b41599bdc9d5ad855451cd710c30;hb=10542b5178b2fa036e0658111523ea68a7a04437;hpb=44cf095889e0f32e501830b3d3d279667146ea94 diff --git a/t/aggregate/unit_core_script_server-without_modules.t b/t/aggregate/unit_core_script_server-without_modules.t index 0fdaa87..d6bbcaf 100644 --- a/t/aggregate/unit_core_script_server-without_modules.t +++ b/t/aggregate/unit_core_script_server-without_modules.t @@ -10,26 +10,19 @@ BEGIN { $ENV{PACKAGE_STASH_IMPLEMENTATION} = 'PP' if $] < '5.008007' } use Test::More; use Try::Tiny; -plan skip_all => "Need Test::Without::Module for this test" - unless try { require Test::Without::Module; 1 }; - -Test::Without::Module->import(qw( +my %hidden = map { (my $m = "$_.pm") =~ s{::}{/}g; $m => 1 } qw( Starman::Server Plack::Handler::Starman MooseX::Daemonize MooseX::Daemonize::Pid::File MooseX::Daemonize::Core -)); - -require "$Bin/../aggregate/unit_core_script_server.t"; +); +local @INC = (sub { + return unless exists $hidden{$_[1]}; + die "Can't locate $_[1] in \@INC (hidden)\n"; +}, @INC); -Test::Without::Module->unimport(qw( - Starman::Server - Plack::Handler::Starman - MooseX::Daemonize - MooseX::Daemonize::Pid::File - MooseX::Daemonize::Core -)); +do "$Bin/../aggregate/unit_core_script_server.t" + or die $@ || 'test returned false'; 1; -