[Rt-commit] rt branch, psgi, updated. rt-3.9.4-140-g07c2fa9
Shawn Moore
sartak at bestpractical.com
Mon Oct 18 06:50:45 EDT 2010
The branch, psgi has been updated
via 07c2fa98033599f9223af266a4e7de319e14d7b5 (commit)
from eca296250d96f95d5d75a6bf3604c06e0336c5e6 (commit)
Summary of changes:
lib/RT/Test.pm | 14 ++++++++++++--
sbin/rt-test-dependencies.in | 1 +
2 files changed, 13 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit 07c2fa98033599f9223af266a4e7de319e14d7b5
Author: Shawn M Moore <sartak at bestpractical.com>
Date: Mon Oct 18 19:50:01 2010 +0900
Plack warning testing using middleware
diff --git a/lib/RT/Test.pm b/lib/RT/Test.pm
index c501fba..fa94b1c 100644
--- a/lib/RT/Test.pm
+++ b/lib/RT/Test.pm
@@ -1152,8 +1152,18 @@ sub start_plack_server {
or die "Can't start a new session: $!";
}
- require RT::Interface::Web::Handler;
- $plack_server->run(RT::Interface::Web::Handler->PSGIApp);
+ # stick this in a scope so that when $app is garbage collected,
+ # StashWarnings can complain about unhandled warnings
+ do {
+ require RT::Interface::Web::Handler;
+ my $app = RT::Interface::Web::Handler->PSGIApp;
+
+ require Plack::Middleware::Test::StashWarnings;
+ $app = Plack::Middleware::Test::StashWarnings->wrap($app);
+
+ $plack_server->run($app);
+ };
+
exit;
}
diff --git a/sbin/rt-test-dependencies.in b/sbin/rt-test-dependencies.in
index 1141a76..3b99f92 100755
--- a/sbin/rt-test-dependencies.in
+++ b/sbin/rt-test-dependencies.in
@@ -236,6 +236,7 @@ HTML::Mason::PSGIHandler
Plack
Test::WWW::Mechanize::PSGI
CGI::Emulate::PSGI
+Plack::Middleware::Test::StashWarnings
.
$deps{'STANDALONE'} = [ text_to_hash( << '.') ];
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list