Give action_ok, action_redirect and action_notfound default test names
Jonathan "Duke" Leto [Sat, 12 Mar 2011 00:20:51 +0000 (16:20 -0800)]
lib/Catalyst/Test.pm

index 8be790c..14dcc47 100644 (file)
@@ -84,15 +84,15 @@ my $build_exports = sub {
         },
         action_ok => sub {
             my $action = shift;
-            return Test::More->builder->ok($request->($action)->is_success, @_);
+            return Test::More->builder->ok($request->($action)->is_success,@_ || "a route handler is defined for $action");
         },
         action_redirect => sub {
             my $action = shift;
-            return Test::More->builder->ok($request->($action)->is_redirect,@_);
+            return Test::More->builder->ok($request->($action)->is_redirect,@_ || "a route handler redirects for $action");
         },
         action_notfound => sub {
             my $action = shift;
-            return Test::More->builder->is_eq($request->($action)->code,404,@_);
+            return Test::More->builder->is_eq($request->($action)->code,404,@_ || "a route handler is not defined for $action");
         },
         contenttype_is => sub {
             my $action = shift;