X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Flib%2FTestMiddlewareFromPlugin%2Ftestmiddlewarefromplugin.pl;fp=t%2Flib%2FTestMiddlewareFromConfig%2Ftestmiddlewarefromconfig.pl;h=b6efd1a84d9cacc33ccd7557a1116cb9d4e58cfb;hp=d470f04af32390240519c7cba3e22ed09dbefaa8;hb=964bf130533c001789a80ef193f03d5c5f3817eb;hpb=59b3e4d0df63749ee601113ce44be5b4340be2a8 diff --git a/t/lib/TestMiddlewareFromConfig/testmiddlewarefromconfig.pl b/t/lib/TestMiddlewareFromPlugin/testmiddlewarefromplugin.pl similarity index 74% rename from t/lib/TestMiddlewareFromConfig/testmiddlewarefromconfig.pl rename to t/lib/TestMiddlewareFromPlugin/testmiddlewarefromplugin.pl index d470f04..b6efd1a 100644 --- a/t/lib/TestMiddlewareFromConfig/testmiddlewarefromconfig.pl +++ b/t/lib/TestMiddlewareFromPlugin/testmiddlewarefromplugin.pl @@ -1,21 +1,21 @@ use Plack::Middleware::Static; my $static = Plack::Middleware::Static->new( - path => qr{^/static/}, root => TestMiddlewareFromConfig->path_to('share')); + path => qr{^/static/}, root => TestMiddlewareFromPlugin->path_to('share')); my $conf = +{ 'Controller::Root', { namespace => '' }, 'psgi_middleware', [ $static, - 'Static', { path => qr{^/static2/}, root => TestMiddlewareFromConfig->path_to('share') }, + 'Static', { path => qr{^/static2/}, root => TestMiddlewareFromPlugin->path_to('share') }, 'Runtime', - '+TestMiddleware::Custom', { path => qr{^/static3/}, root => TestMiddlewareFromConfig->path_to('share') }, + '+TestMiddleware::Custom', { path => qr{^/static3/}, root => TestMiddlewareFromPlugin->path_to('share') }, sub { my $app = shift; return sub { my $env = shift; if($env->{PATH_INFO} =~m/forced/) { - Plack::App::File->new(file=>TestMiddlewareFromConfig->path_to(qw/share static forced.txt/)) + Plack::App::File->new(file=>TestMiddlewareFromPlugin->path_to(qw/share static forced.txt/)) ->call($env); } else { return $app->($env);