Skip to content

Commit

Permalink
Forced prereqs versions; not testing streaming under non-standard Pla…
Browse files Browse the repository at this point in the history
…ck::Test implementation
  • Loading branch information
Zbigniew Lukasiak committed Feb 28, 2011
1 parent 04a5baf commit 1c621ca
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
4 changes: 3 additions & 1 deletion dist.ini
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ author = Zbigniew Lukasiak <zby@cpan.org>
license = Artistic_2_0 license = Artistic_2_0
copyright_holder = Zbigniew Lukasiak <zby@cpan.org> copyright_holder = Zbigniew Lukasiak <zby@cpan.org>
copyright_year = 2010 copyright_year = 2010
version = 0.006 version = 0.007


[@Basic] [@Basic]
[AutoPrereqs] [AutoPrereqs]
[Prereqs] [Prereqs]
Plack::Request = 0.9967
Plack::Response = 0.9967
[TestRelease] [TestRelease]
[PkgVersion] [PkgVersion]


Expand Down
16 changes: 14 additions & 2 deletions t/10.main.t
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ test_psgi(
is( $res->code, 404 , '404 for non existing controller' ); is( $res->code, 404 , '404 for non existing controller' );
$res = $cb->(GET "/ThisIsNotController/"); $res = $cb->(GET "/ThisIsNotController/");
is( $res->code, 404 , '404 for a non controller' ); is( $res->code, 404 , '404 for a non controller' );
$res = $cb->(GET "/streaming?who=zby");
like( $res->content, qr/Hello, zby/ );
$res = $cb->(GET "/DoesNotCompile/"); $res = $cb->(GET "/DoesNotCompile/");
is( $res->code, 500, '500 for controller that does not compile' ); is( $res->code, 500, '500 for controller that does not compile' );
# in some circumstances the above code dies instead of issuing a 500 # in some circumstances the above code dies instead of issuing a 500
Expand All @@ -62,4 +61,17 @@ test_psgi(
} }
); );


SKIP: {
skip '$Plack::Test::Impl ne "MockHTTP" - streaming might be not implemented', 1 if $Plack::Test::Impl ne 'MockHTTP';
test_psgi(
app => MyApp->new()->psgi_app,
client => sub {
my $cb = shift;
my $res = $cb->(GET "/streaming?who=zby");
like( $res->content, qr/Hello, zby/ );
}
);
}


done_testing(); done_testing();

0 comments on commit 1c621ca

Please sign in to comment.