i want some kick ass tests for this :)
[catagits/Catalyst-Runtime.git] / t / 15connection.t
index 54ead9d..a5117fd 100644 (file)
@@ -2,16 +2,16 @@ package TestApp;
 
 use Catalyst qw[-Engine=Test];
 
-__PACKAGE__->action(
-    hostname => sub {
-        my ( $self, $c ) = @_;
-        $c->res->output( $c->req->hostname );
-    },
-    address => sub {
-        my ( $self, $c ) = @_;
-        $c->res->output( $c->req->address );
-    }
-);
+sub hostname : Global {
+    my ( $self, $c ) = @_;
+    $c->res->output( $c->req->hostname );
+}
+sub address : Global {
+    my ( $self, $c ) = @_;
+    $c->res->output( $c->req->address );
+}
+
+__PACKAGE__->setup;
 
 package main;