X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Faggregate%2Funit_core_script_server-without_modules.t;h=d6bbcaff960c1ed2183f3126b40d919f0f52a917;hb=88e5a8b0c4d28e46b8ba6b6b9567063e57af9063;hp=3bb7d76c047e581852fc51c443ce95b346a2d006;hpb=0f6be50c90e64a135de4f8fd00703b3fc34f0fa5;p=catagits%2FCatalyst-Runtime.git diff --git a/t/aggregate/unit_core_script_server-without_modules.t b/t/aggregate/unit_core_script_server-without_modules.t index 3bb7d76..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( - Starman +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 -)); +); +local @INC = (sub { + return unless exists $hidden{$_[1]}; + die "Can't locate $_[1] in \@INC (hidden)\n"; +}, @INC); -require "$Bin/../aggregate/unit_core_script_server.t"; - -Test::Without::Module->unimport(qw( - Starman - 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; -