Skip to content

Commit

Permalink
Simplify test
Browse files Browse the repository at this point in the history
  • Loading branch information
miyagawa committed Jun 12, 2013
1 parent 91329ee commit f19a6e7
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions t/Plack-Response/to_app.t
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,10 @@ use HTTP::Request::Common;
use Plack::Test;
use Plack::Response;

sub res {
my $res = Plack::Response->new;
my %v = @_;
while (my($k, $v) = each %v) {
$res->$k($v);
}
$res;
}
my $res = Plack::Response->new(200);
$res->body("hello");

my $res = res(
status => 200,
body => 'hello',
);


test_psgi $res->to_app(), sub {
test_psgi $res->to_app, sub {
my $cb = shift;

my $res = $cb->(GET "/");
Expand Down

0 comments on commit f19a6e7

Please sign in to comment.