Created
September 15, 2009 14:05
-
-
Save lestrrat/187311 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/lib/Plack/Test.pm | |
+++ b/lib/Plack/Test.pm | |
@@ -116,7 +116,7 @@ my @TEST = ( | |
}, | |
diff --git a/lib/Plack/Test.pm b/lib/Plack/Test.pm | |
index fa9637d..40c4174 100644 | |
--- a/lib/Plack/Test.pm | |
+++ b/lib/Plack/Test.pm | |
@@ -116,7 +116,7 @@ my @TEST = ( | |
}, | |
sub { | |
my $env = shift; | |
- open my $fh, "$BaseDir/assets/face.jpg"; | |
+ open my $fh, "<", "$BaseDir/assets/face.jpg"; | |
return [ | |
200, | |
[ 'Content-Type' => 'image/jpeg', 'Content-Length' => -s $fh ], | |
@@ -141,7 +141,7 @@ my @TEST = ( | |
}, | |
sub { | |
my $env = shift; | |
- open my $fh, "$BaseDir/assets/kyoto.jpg"; | |
+ open my $fh, '<', "$BaseDir/assets/kyoto.jpg"; | |
return [ | |
200, | |
[ 'Content-Type' => 'image/jpeg', 'Content-Length' => -s $fh ], | |
@@ -418,6 +418,7 @@ sub run_server_tests { | |
note $test->[0]; | |
my $ua = LWP::UserAgent->new; | |
my $res = $ua->request($test->[1]->($port)); | |
+ local $Test::Builder::Level = $Test::Builder::Level + 3; | |
$test->[3]->($res, $port); | |
}, | |
server => sub { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment