From: Yousef H. Alhashemi Date: Thu, 3 Sep 2009 12:13:15 +0000 (+0000) Subject: Made $warnings a global variable for the appclass actions test to work. X-Git-Tag: 5.80013~12^2~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=dbf6a6fcd7a51226a353e2a800a1cf5c7e8e9c66;hp=5ec24151d10209c4bf8b4522e515dd775b51fa9c Made $warnings a global variable for the appclass actions test to work. --- diff --git a/t/deprecated_appclass_action_warnings.t b/t/deprecated_appclass_action_warnings.t index a9979fe..f25d8d5 100644 --- a/t/deprecated_appclass_action_warnings.t +++ b/t/deprecated_appclass_action_warnings.t @@ -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 diff --git a/t/lib/DeprecatedActionsInAppClassTestApp.pm b/t/lib/DeprecatedActionsInAppClassTestApp.pm index 565bc3e..9c870b0 100644 --- a/t/lib/DeprecatedActionsInAppClassTestApp.pm +++ b/t/lib/DeprecatedActionsInAppClassTestApp.pm @@ -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;