From: Andreas Marienborg Date: Tue, 12 Mar 2013 02:09:44 +0000 (+0700) Subject: Change PSGI tests from subtests to blocks X-Git-Tag: 5.90030~19^2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=93c35f02b80d64aefb87db79ba40951bdcb84356 Change PSGI tests from subtests to blocks To work with Test::More 0.88, which is what catalyst requires. --- diff --git a/t/psgi-log.t b/t/psgi-log.t index 2d9e2c0..e010d07 100644 --- a/t/psgi-log.t +++ b/t/psgi-log.t @@ -46,8 +46,8 @@ use HTTP::Request::Common; no Moose; } - -subtest "psgi.errors" => sub{ +#subtest "psgi.errors" => sub +{ my $handle = MockHandle->new(); my $app = builder { @@ -69,12 +69,13 @@ subtest "psgi.errors" => sub{ my $cb = shift; my $res = $cb->(GET "/log/debug"); my @logs = $handle->logs; - is(scalar(@logs), 1, "one event output"); - like($logs[0], qr/debug$/, "event matches test data"); + is(scalar(@logs), 1, "psgi.errors: one event output"); + like($logs[0], qr/debug$/, "psgi.errors: event matches test data"); }; }; -subtest "psgix.logger" => sub { +#subtest "psgix.logger" => sub +{ my @logs; my $logger = sub { @@ -95,8 +96,8 @@ subtest "psgix.logger" => sub { test_psgi $app, sub { my $cb = shift; my $res = $cb->(GET "/log/debug"); - is(scalar(@logs), 1, "one event logged"); - is_deeply($logs[0], { level => 'debug', message => "debug" }, "right stuff"); + is(scalar(@logs), 1, "psgix.logger: one event logged"); + is_deeply($logs[0], { level => 'debug', message => "debug" }, "psgix.logger: right stuff"); }; };