Permalink
Browse files

Forced prereqs versions; not testing streaming under non-standard Pla…

…ck::Test implementation
  • Loading branch information...
1 parent 04a5baf commit 1c621ca3bda0c68817cf97049ad44d7f7100be67 Zbigniew Lukasiak committed Feb 28, 2011
Showing with 17 additions and 3 deletions.
  1. +3 −1 dist.ini
  2. +14 −2 t/10.main.t
View
@@ -3,11 +3,13 @@ author = Zbigniew Lukasiak <zby@cpan.org>
license = Artistic_2_0
copyright_holder = Zbigniew Lukasiak <zby@cpan.org>
copyright_year = 2010
-version = 0.006
+version = 0.007
[@Basic]
[AutoPrereqs]
[Prereqs]
+Plack::Request = 0.9967
+Plack::Response = 0.9967
[TestRelease]
[PkgVersion]
View
@@ -51,8 +51,7 @@ test_psgi(
is( $res->code, 404 , '404 for non existing controller' );
$res = $cb->(GET "/ThisIsNotController/");
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/");
is( $res->code, 500, '500 for controller that does not compile' );
# in some circumstances the above code dies instead of issuing a 500
@@ -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();

0 comments on commit 1c621ca

Please sign in to comment.