convert to Distar
[catagits/Web-Simple.git] / t / env.t
diff --git a/t/env.t b/t/env.t
index 7a97658..d566671 100644 (file)
--- a/t/env.t
+++ b/t/env.t
@@ -10,9 +10,9 @@ use Test::More (
 {
   use Web::Simple 'EnvTest';
   package EnvTest;
-  dispatch {
+  sub dispatch_request  {
     sub (GET) {
-      my $env = @_[ENV];
+      my $env = $_[PSGI_ENV];
       [ 200,
         [ "Content-type" => "text/plain" ],
         [ 'foo' ]
@@ -33,4 +33,4 @@ sub run_request {
   return $c->response;
 }
 
-run_request(GET 'http://localhost/');
+ok run_request(GET 'http://localhost/')->is_success;