Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

perl-tidy

  • Loading branch information...
commit ffaae742b882b5a1d013424baa824d379ac14aa8 1 parent f672d1a
@dann authored
Showing with 8 additions and 9 deletions.
  1. +8 −9 t/engine.t
View
17 t/engine.t
@@ -1,13 +1,15 @@
use strict;
use Test::Base;
+use PlackX::Engine;
+use Plack::Response;
use PlackX::Engine::Builder::Declare;
filters {
- app => 'eval',
- header => 'yaml',
- env => 'yaml',
+ app => 'eval',
+ header => 'yaml',
+ env => 'yaml',
res_headers => 'yaml',
- res_body => 'yaml',
+ res_body => 'yaml',
};
plan tests => 2 * blocks;
@@ -15,14 +17,11 @@ plan tests => 2 * blocks;
run {
my $block = shift;
- use PlackX::Engine;
- use Plack::Response;
-
my $request_handler = sub {
my $req = shift;
my $res = Plack::Response->new;
$res->code( $block->status );
- $res->header( %{$block->header} );
+ $res->header( %{ $block->header } );
$res->body( $block->body );
return $res;
};
@@ -43,7 +42,7 @@ run {
my $res = $handler->( $block->env );
- is $res->[0], $block->res_status;
+ is $res->[0], $block->res_status;
is_deeply $res->[1], $block->res_headers;
};
Please sign in to comment.
Something went wrong with that request. Please try again.