#!/usr/bin/env perl use strict; use warnings; use Test::More; use Plack::Test; use HTTP::Request::Common; use Plack::Builder; my $app = builder { enable "Xslate", path => qr{^/}, root => 't/basic/', pass_through => 1; sub { [ 404, [], [ 'pass_through to base app' ] ] }; }; test_psgi app => $app, client => sub { my $cb = shift; { my $res = $cb->(GET '/index.html'); ok($res->is_success) || diag($res->content); my $rendered = <<'CONTENT';

Hello world

CONTENT is($res->content, $rendered); is($res->header('Content-Length'), length($rendered)); } { my $res = $cb->(GET '/missing.html'); is($res->code, 404); is($res->content, 'pass_through to base app'); } }; done_testing;