Made $warnings a global variable for the appclass actions test to work.
Yousef H. Alhashemi [Thu, 3 Sep 2009 12:13:15 +0000 (12:13 +0000)]
t/deprecated_appclass_action_warnings.t
t/lib/DeprecatedActionsInAppClassTestApp.pm

index a9979fe..f25d8d5 100644 (file)
@@ -15,4 +15,4 @@ Catalyst->log($logger);
 
 ok( my $response = request('http://localhost/foo'), 'Request' );
 ok( $response->is_success, 'Response Successful 2xx' );
-is( $warnings, 1, 'Get the appclass action warning' );
\ No newline at end of file
+is( $DeprecatedActionsInAppClassTestApp::Log::warnings, 1, 'Get the appclass action warning' );
\ No newline at end of file
index 565bc3e..9c870b0 100644 (file)
@@ -20,6 +20,8 @@ use strict;
 use warnings;
 use base qw/Catalyst::Log/;
 
+our $warnings;
+
 sub warn {
     my ($self, $warning) = @_;
     $warnings++ if $warning =~ /action methods .+ found defined/i;