[Catalyst-commits] r13666 - in trunk/Catalyst-Plugin-PageCache: . t t/lib

timbunce at dev.catalyst.perl.org timbunce at dev.catalyst.perl.org
Mon Nov 1 11:29:02 GMT 2010


Author: timbunce
Date: 2010-11-01 11:29:02 +0000 (Mon, 01 Nov 2010)
New Revision: 13666

Modified:
   trunk/Catalyst-Plugin-PageCache/Changes
   trunk/Catalyst-Plugin-PageCache/t/04cache.t
   trunk/Catalyst-Plugin-PageCache/t/04critic.t
   trunk/Catalyst-Plugin-PageCache/t/05expires.t
   trunk/Catalyst-Plugin-PageCache/t/06auto_cache.t
   trunk/Catalyst-Plugin-PageCache/t/07set_http_headers.t
   trunk/Catalyst-Plugin-PageCache/t/08params.t
   trunk/Catalyst-Plugin-PageCache/t/09datetime.t
   trunk/Catalyst-Plugin-PageCache/t/10options.t
   trunk/Catalyst-Plugin-PageCache/t/11nocache.t
   trunk/Catalyst-Plugin-PageCache/t/12i18n.t
   trunk/Catalyst-Plugin-PageCache/t/13cachehook.t
   trunk/Catalyst-Plugin-PageCache/t/14keymaker.t
   trunk/Catalyst-Plugin-PageCache/t/15busy_lock.t
   trunk/Catalyst-Plugin-PageCache/t/lib/TestApp.pm
Log:
Updated tests to use Catalyst::Plugin::Cache::Store::Memory instead
of the deprecated ::FileCache (Report and patch from Rod Taylor) RT#53304.
Fixed t/04critic.t to not fail if Test::Perl::Critic is not installed.
XXX Test 15busy_lock.t fails as the moment.


Modified: trunk/Catalyst-Plugin-PageCache/Changes
===================================================================
--- trunk/Catalyst-Plugin-PageCache/Changes	2010-10-29 12:05:18 UTC (rev 13665)
+++ trunk/Catalyst-Plugin-PageCache/Changes	2010-11-01 11:29:02 UTC (rev 13666)
@@ -1,5 +1,11 @@
 Revision history for Perl extension Catalyst::Plugin::PageCache
 
+0.23    XXX
+        - Updated tests to use Catalyst::Plugin::Cache::Store::Memory instead
+          of the deprecated ::FileCache (Report and patch from Rod Taylor) RT#53304.
+        - Fixed t/04critic.t to not fail if Test::Perl::Critic is not installed.
+        - XXX Test 15busy_lock.t fails as the moment.
+
 0.22    2009-06-25 10:38:00
         - Update to use MRO::Compat
 

Modified: trunk/Catalyst-Plugin-PageCache/t/04cache.t
===================================================================
--- trunk/Catalyst-Plugin-PageCache/t/04cache.t	2010-10-29 12:05:18 UTC (rev 13665)
+++ trunk/Catalyst-Plugin-PageCache/t/04cache.t	2010-11-01 11:29:02 UTC (rev 13666)
@@ -9,9 +9,9 @@
 use File::Path;
 
 BEGIN {
-    eval "use Catalyst::Plugin::Cache::FileCache";
+    eval "use Catalyst::Plugin::Cache";
     plan $@
-        ? ( skip_all => 'needs Catalyst::Plugin::Cache::FileCache for testing' )
+        ? ( skip_all => 'needs Catalyst::Plugin::Cache for testing' )
         : ( tests => 20 );
 }
 

Modified: trunk/Catalyst-Plugin-PageCache/t/04critic.t
===================================================================
--- trunk/Catalyst-Plugin-PageCache/t/04critic.t	2010-10-29 12:05:18 UTC (rev 13665)
+++ trunk/Catalyst-Plugin-PageCache/t/04critic.t	2010-11-01 11:29:02 UTC (rev 13666)
@@ -5,18 +5,12 @@
 use FindBin ();
 use Test::More;
 
-if ( !-e "$FindBin::Bin/../MANIFEST.SKIP" ) {
-    plan skip_all => 'Critic test only for developers.';
-}
-else {
-    eval { require Test::Perl::Critic };
-    if ( $@ ) {
-        plan tests => 1;
-        fail( 'You must install Test::Perl::Critic to run 04critic.t' );
-        exit;
-    }
-}
+plan skip_all => 'developer test'
+    if not -e "$FindBin::Bin/../MANIFEST.SKIP";
 
+plan skip_all => 'requires Test::Perl::Critic'
+    if not eval { require Test::Perl::Critic };
+
 my $rcfile = File::Spec->catfile( 't', '04critic.rc' );
 Test::Perl::Critic->import( -profile => $rcfile );
-all_critic_ok();
\ No newline at end of file
+all_critic_ok();

Modified: trunk/Catalyst-Plugin-PageCache/t/05expires.t
===================================================================
--- trunk/Catalyst-Plugin-PageCache/t/05expires.t	2010-10-29 12:05:18 UTC (rev 13665)
+++ trunk/Catalyst-Plugin-PageCache/t/05expires.t	2010-11-01 11:29:02 UTC (rev 13666)
@@ -9,9 +9,9 @@
 use File::Path;
 
 BEGIN {
-    eval "use Catalyst::Plugin::Cache::FileCache";
+    eval "use Catalyst::Plugin::Cache";
     plan $@
-        ? ( skip_all => 'needs Catalyst::Plugin::Cache::FileCache for testing' )
+        ? ( skip_all => 'needs Catalyst::Plugin::Cache for testing' )
         : ( tests => 6 );
 }
 

Modified: trunk/Catalyst-Plugin-PageCache/t/06auto_cache.t
===================================================================
--- trunk/Catalyst-Plugin-PageCache/t/06auto_cache.t	2010-10-29 12:05:18 UTC (rev 13665)
+++ trunk/Catalyst-Plugin-PageCache/t/06auto_cache.t	2010-11-01 11:29:02 UTC (rev 13666)
@@ -9,9 +9,9 @@
 use File::Path;
 
 BEGIN {
-    eval "use Catalyst::Plugin::Cache::FileCache";
+    eval "use Catalyst::Plugin::Cache";
     plan $@
-        ? ( skip_all => 'needs Catalyst::Plugin::Cache::FileCache for testing' )
+        ? ( skip_all => 'needs Catalyst::Plugin::Cache for testing' )
         : ( tests => 8 );
 }
 

Modified: trunk/Catalyst-Plugin-PageCache/t/07set_http_headers.t
===================================================================
--- trunk/Catalyst-Plugin-PageCache/t/07set_http_headers.t	2010-10-29 12:05:18 UTC (rev 13665)
+++ trunk/Catalyst-Plugin-PageCache/t/07set_http_headers.t	2010-11-01 11:29:02 UTC (rev 13666)
@@ -9,9 +9,9 @@
 use File::Path;
 
 BEGIN {
-    eval "use Catalyst::Plugin::Cache::FileCache";
+    eval "use Catalyst::Plugin::Cache";
     plan $@
-        ? ( skip_all => 'needs Catalyst::Plugin::Cache::FileCache for testing' )
+        ? ( skip_all => 'needs Catalyst::Plugin::Cache for testing' )
         : ( tests => 11 );
 }
 

Modified: trunk/Catalyst-Plugin-PageCache/t/08params.t
===================================================================
--- trunk/Catalyst-Plugin-PageCache/t/08params.t	2010-10-29 12:05:18 UTC (rev 13665)
+++ trunk/Catalyst-Plugin-PageCache/t/08params.t	2010-11-01 11:29:02 UTC (rev 13666)
@@ -9,9 +9,9 @@
 use File::Path;
 
 BEGIN {
-    eval "use Catalyst::Plugin::Cache::FileCache";
+    eval "use Catalyst::Plugin::Cache";
     plan $@
-        ? ( skip_all => 'needs Catalyst::Plugin::Cache::FileCache for testing' )
+        ? ( skip_all => 'needs Catalyst::Plugin::Cache for testing' )
         : ( tests => 8 );
 }
 

Modified: trunk/Catalyst-Plugin-PageCache/t/09datetime.t
===================================================================
--- trunk/Catalyst-Plugin-PageCache/t/09datetime.t	2010-10-29 12:05:18 UTC (rev 13665)
+++ trunk/Catalyst-Plugin-PageCache/t/09datetime.t	2010-11-01 11:29:02 UTC (rev 13666)
@@ -9,9 +9,9 @@
 use File::Path;
 
 BEGIN {
-    eval "use Catalyst::Plugin::Cache::FileCache";
+    eval "use Catalyst::Plugin::Cache";
     if ( $@ ) {
-        plan ( skip_all => 'needs Catalyst::Plugin::Cache::FileCache for testing' );
+        plan ( skip_all => 'needs Catalyst::Plugin::Cache for testing' );
     } else {
         eval "use DateTime";
         if ( $@ ) {

Modified: trunk/Catalyst-Plugin-PageCache/t/10options.t
===================================================================
--- trunk/Catalyst-Plugin-PageCache/t/10options.t	2010-10-29 12:05:18 UTC (rev 13665)
+++ trunk/Catalyst-Plugin-PageCache/t/10options.t	2010-11-01 11:29:02 UTC (rev 13666)
@@ -9,9 +9,9 @@
 use File::Path;
 
 BEGIN {
-    eval "use Catalyst::Plugin::Cache::FileCache";
+    eval "use Catalyst::Plugin::Cache";
     plan $@
-        ? ( skip_all => 'needs Catalyst::Plugin::Cache::FileCache for testing' )
+        ? ( skip_all => 'needs Catalyst::Plugin::Cache for testing' )
         : ( tests => 7 );
 }
 

Modified: trunk/Catalyst-Plugin-PageCache/t/11nocache.t
===================================================================
--- trunk/Catalyst-Plugin-PageCache/t/11nocache.t	2010-10-29 12:05:18 UTC (rev 13665)
+++ trunk/Catalyst-Plugin-PageCache/t/11nocache.t	2010-11-01 11:29:02 UTC (rev 13666)
@@ -9,9 +9,9 @@
 use File::Path;
 
 BEGIN {
-    eval "use Catalyst::Plugin::Cache::FileCache";
+    eval "use Catalyst::Plugin::Cache";
     plan $@
-        ? ( skip_all => 'needs Catalyst::Plugin::Cache::FileCache for testing' )
+        ? ( skip_all => 'needs Catalyst::Plugin::Cache for testing' )
         : ( tests => 7 );
 }
 

Modified: trunk/Catalyst-Plugin-PageCache/t/12i18n.t
===================================================================
--- trunk/Catalyst-Plugin-PageCache/t/12i18n.t	2010-10-29 12:05:18 UTC (rev 13665)
+++ trunk/Catalyst-Plugin-PageCache/t/12i18n.t	2010-11-01 11:29:02 UTC (rev 13666)
@@ -14,8 +14,8 @@
     eval "use Catalyst::Plugin::I18N";
     $reason .= 'Needs Catalyst::Plugin::I18N for this test. ' if $@;
 
-    eval "use Catalyst::Plugin::Cache::FileCache";
-    $reason .= 'Needs Catalyst::Plugin::Cache::FileCache for testing.' if $@;
+    eval "use Catalyst::Plugin::Cache";
+    $reason .= 'Needs Catalyst::Plugin::Cache for testing' if $@;
 
     plan $reason
         ? ( skip_all => $reason )

Modified: trunk/Catalyst-Plugin-PageCache/t/13cachehook.t
===================================================================
--- trunk/Catalyst-Plugin-PageCache/t/13cachehook.t	2010-10-29 12:05:18 UTC (rev 13665)
+++ trunk/Catalyst-Plugin-PageCache/t/13cachehook.t	2010-11-01 11:29:02 UTC (rev 13666)
@@ -10,9 +10,9 @@
 use File::Path;
 
 BEGIN {
-    eval "use Catalyst::Plugin::Cache::FileCache";
+    eval "use Catalyst::Plugin::Cache";
     plan $@
-        ? ( skip_all => 'needs Catalyst::Plugin::Cache::FileCache for testing' )
+        ? ( skip_all => 'needs Catalyst::Plugin::Cache for testing' )
         : ( tests => 16 );
 }
 

Modified: trunk/Catalyst-Plugin-PageCache/t/14keymaker.t
===================================================================
--- trunk/Catalyst-Plugin-PageCache/t/14keymaker.t	2010-10-29 12:05:18 UTC (rev 13665)
+++ trunk/Catalyst-Plugin-PageCache/t/14keymaker.t	2010-11-01 11:29:02 UTC (rev 13666)
@@ -10,9 +10,9 @@
 use File::Path;
 
 BEGIN {
-    eval "use Catalyst::Plugin::Cache::FileCache";
+    eval "use Catalyst::Plugin::Cache";
     plan $@
-      ? ( skip_all => 'needs Catalyst::Plugin::Cache::FileCache for testing' )
+        ? ( skip_all => 'needs Catalyst::Plugin::Cache for testing' )
       : ( tests => 8 );
 }
 

Modified: trunk/Catalyst-Plugin-PageCache/t/15busy_lock.t
===================================================================
--- trunk/Catalyst-Plugin-PageCache/t/15busy_lock.t	2010-10-29 12:05:18 UTC (rev 13665)
+++ trunk/Catalyst-Plugin-PageCache/t/15busy_lock.t	2010-11-01 11:29:02 UTC (rev 13666)
@@ -10,9 +10,9 @@
 use Time::HiRes qw(time sleep);
 
 BEGIN {
-    eval "use Catalyst::Plugin::Cache::FileCache";
+    eval "use Catalyst::Plugin::Cache";
     if ( $@ ) {
-        plan skip_all => 'needs Catalyst::Plugin::Cache::FileCache for testing';
+        plan skip_all => 'needs Catalyst::Plugin::Cache for testing';
     }
 }
 
@@ -57,4 +57,4 @@
     else {
         exit 1;
     }
-}
\ No newline at end of file
+}

Modified: trunk/Catalyst-Plugin-PageCache/t/lib/TestApp.pm
===================================================================
--- trunk/Catalyst-Plugin-PageCache/t/lib/TestApp.pm	2010-10-29 12:05:18 UTC (rev 13665)
+++ trunk/Catalyst-Plugin-PageCache/t/lib/TestApp.pm	2010-11-01 11:29:02 UTC (rev 13666)
@@ -8,13 +8,10 @@
 
 TestApp->config(
     name => 'TestApp',
-    cache => {
-        storage => 't/var',
-    },
     counter => 0,
 );
 
-TestApp->setup( qw/Cache::FileCache PageCache/ );
+TestApp->setup( qw/Cache Cache::Store::Memory PageCache/ );
 
 sub default : Private {
     my ( $self, $c ) = @_;




More information about the Catalyst-commits mailing list