Subject: | Update Tests |
I found testing difficult. The FileCache plugin wouldn't even install for me.
Tests have been changed to use Catalyst::Plugin::Cache::Store::Memory instead which has the nice side-effect of not needing to write to disk (t/var is not necessary).
Also, moved t/lib/TestApp/C to t/lib/TestApp/Controller due to Catalyst deprecation warning.
Tests have been changed to use Catalyst::Plugin::Cache::Store::Memory instead which has the nice side-effect of not needing to write to disk (t/var is not necessary).
Also, moved t/lib/TestApp/C to t/lib/TestApp/Controller due to Catalyst deprecation warning.
Subject: | tests.patch |
Only in Catalyst-Plugin-PageCache-0.22/t: .DS_Store
diff -cr Catalyst-Plugin-PageCache-0.22.orig/t/04cache.t Catalyst-Plugin-PageCache-0.22/t/04cache.t
*** Catalyst-Plugin-PageCache-0.22.orig/t/04cache.t 2009-04-18 09:14:38.000000000 -0400
--- Catalyst-Plugin-PageCache-0.22/t/04cache.t 2010-01-02 17:18:17.000000000 -0500
***************
*** 9,17 ****
use File::Path;
BEGIN {
! eval "use Catalyst::Plugin::Cache::FileCache";
plan $@
! ? ( skip_all => 'needs Catalyst::Plugin::Cache::FileCache for testing' )
: ( tests => 20 );
}
--- 9,17 ----
use File::Path;
BEGIN {
! eval "use Catalyst::Plugin::Cache";
plan $@
! ? ( skip_all => 'needs Catalyst::Plugin::Cache for testing' )
: ( tests => 20 );
}
diff -cr Catalyst-Plugin-PageCache-0.22.orig/t/05expires.t Catalyst-Plugin-PageCache-0.22/t/05expires.t
*** Catalyst-Plugin-PageCache-0.22.orig/t/05expires.t 2009-04-18 09:14:38.000000000 -0400
--- Catalyst-Plugin-PageCache-0.22/t/05expires.t 2010-01-02 17:39:17.000000000 -0500
***************
*** 9,17 ****
use File::Path;
BEGIN {
! eval "use Catalyst::Plugin::Cache::FileCache";
plan $@
! ? ( skip_all => 'needs Catalyst::Plugin::Cache::FileCache for testing' )
: ( tests => 6 );
}
--- 9,17 ----
use File::Path;
BEGIN {
! eval "use Catalyst::Plugin::Cache";
plan $@
! ? ( skip_all => 'needs Catalyst::Plugin::Cache for testing' )
: ( tests => 6 );
}
diff -cr Catalyst-Plugin-PageCache-0.22.orig/t/06auto_cache.t Catalyst-Plugin-PageCache-0.22/t/06auto_cache.t
*** Catalyst-Plugin-PageCache-0.22.orig/t/06auto_cache.t 2009-04-18 09:14:38.000000000 -0400
--- Catalyst-Plugin-PageCache-0.22/t/06auto_cache.t 2010-01-02 17:39:28.000000000 -0500
***************
*** 9,17 ****
use File::Path;
BEGIN {
! eval "use Catalyst::Plugin::Cache::FileCache";
plan $@
! ? ( skip_all => 'needs Catalyst::Plugin::Cache::FileCache for testing' )
: ( tests => 8 );
}
--- 9,17 ----
use File::Path;
BEGIN {
! eval "use Catalyst::Plugin::Cache";
plan $@
! ? ( skip_all => 'needs Catalyst::Plugin::Cache for testing' )
: ( tests => 8 );
}
diff -cr Catalyst-Plugin-PageCache-0.22.orig/t/07set_http_headers.t Catalyst-Plugin-PageCache-0.22/t/07set_http_headers.t
*** Catalyst-Plugin-PageCache-0.22.orig/t/07set_http_headers.t 2009-04-18 09:14:38.000000000 -0400
--- Catalyst-Plugin-PageCache-0.22/t/07set_http_headers.t 2010-01-02 17:39:40.000000000 -0500
***************
*** 9,17 ****
use File::Path;
BEGIN {
! eval "use Catalyst::Plugin::Cache::FileCache";
plan $@
! ? ( skip_all => 'needs Catalyst::Plugin::Cache::FileCache for testing' )
: ( tests => 11 );
}
--- 9,17 ----
use File::Path;
BEGIN {
! eval "use Catalyst::Plugin::Cache";
plan $@
! ? ( skip_all => 'needs Catalyst::Plugin::Cache for testing' )
: ( tests => 11 );
}
diff -cr Catalyst-Plugin-PageCache-0.22.orig/t/08params.t Catalyst-Plugin-PageCache-0.22/t/08params.t
*** Catalyst-Plugin-PageCache-0.22.orig/t/08params.t 2009-04-18 09:14:38.000000000 -0400
--- Catalyst-Plugin-PageCache-0.22/t/08params.t 2010-01-02 17:39:46.000000000 -0500
***************
*** 9,17 ****
use File::Path;
BEGIN {
! eval "use Catalyst::Plugin::Cache::FileCache";
plan $@
! ? ( skip_all => 'needs Catalyst::Plugin::Cache::FileCache for testing' )
: ( tests => 8 );
}
--- 9,17 ----
use File::Path;
BEGIN {
! eval "use Catalyst::Plugin::Cache";
plan $@
! ? ( skip_all => 'needs Catalyst::Plugin::Cache for testing' )
: ( tests => 8 );
}
diff -cr Catalyst-Plugin-PageCache-0.22.orig/t/09datetime.t Catalyst-Plugin-PageCache-0.22/t/09datetime.t
*** Catalyst-Plugin-PageCache-0.22.orig/t/09datetime.t 2009-04-18 09:14:38.000000000 -0400
--- Catalyst-Plugin-PageCache-0.22/t/09datetime.t 2010-01-02 19:37:30.000000000 -0500
***************
*** 9,17 ****
use File::Path;
BEGIN {
! eval "use Catalyst::Plugin::Cache::FileCache";
if ( $@ ) {
! plan ( skip_all => 'needs Catalyst::Plugin::Cache::FileCache for testing' );
} else {
eval "use DateTime";
if ( $@ ) {
--- 9,17 ----
use File::Path;
BEGIN {
! eval "use Catalyst::Plugin::Cache";
if ( $@ ) {
! plan ( skip_all => 'needs Catalyst::Plugin::Cache for testing' );
} else {
eval "use DateTime";
if ( $@ ) {
diff -cr Catalyst-Plugin-PageCache-0.22.orig/t/10options.t Catalyst-Plugin-PageCache-0.22/t/10options.t
*** Catalyst-Plugin-PageCache-0.22.orig/t/10options.t 2009-04-18 09:14:38.000000000 -0400
--- Catalyst-Plugin-PageCache-0.22/t/10options.t 2010-01-02 17:40:01.000000000 -0500
***************
*** 9,17 ****
use File::Path;
BEGIN {
! eval "use Catalyst::Plugin::Cache::FileCache";
plan $@
! ? ( skip_all => 'needs Catalyst::Plugin::Cache::FileCache for testing' )
: ( tests => 7 );
}
--- 9,17 ----
use File::Path;
BEGIN {
! eval "use Catalyst::Plugin::Cache";
plan $@
! ? ( skip_all => 'needs Catalyst::Plugin::Cache for testing' )
: ( tests => 7 );
}
diff -cr Catalyst-Plugin-PageCache-0.22.orig/t/11nocache.t Catalyst-Plugin-PageCache-0.22/t/11nocache.t
*** Catalyst-Plugin-PageCache-0.22.orig/t/11nocache.t 2009-04-18 09:14:38.000000000 -0400
--- Catalyst-Plugin-PageCache-0.22/t/11nocache.t 2010-01-02 17:40:22.000000000 -0500
***************
*** 9,17 ****
use File::Path;
BEGIN {
! eval "use Catalyst::Plugin::Cache::FileCache";
plan $@
! ? ( skip_all => 'needs Catalyst::Plugin::Cache::FileCache for testing' )
: ( tests => 7 );
}
--- 9,17 ----
use File::Path;
BEGIN {
! eval "use Catalyst::Plugin::Cache";
plan $@
! ? ( skip_all => 'needs Catalyst::Plugin::Cache for testing' )
: ( tests => 7 );
}
diff -cr Catalyst-Plugin-PageCache-0.22.orig/t/12i18n.t Catalyst-Plugin-PageCache-0.22/t/12i18n.t
*** Catalyst-Plugin-PageCache-0.22.orig/t/12i18n.t 2009-04-18 09:14:38.000000000 -0400
--- Catalyst-Plugin-PageCache-0.22/t/12i18n.t 2010-01-02 17:40:50.000000000 -0500
***************
*** 14,21 ****
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 $@;
plan $reason
? ( skip_all => $reason )
--- 14,21 ----
eval "use Catalyst::Plugin::I18N";
$reason .= 'Needs Catalyst::Plugin::I18N for this test. ' if $@;
! eval "use Catalyst::Plugin::Cache";
! $reason .= 'Needs Catalyst::Plugin::Cache for testing' if $@;
plan $reason
? ( skip_all => $reason )
diff -cr Catalyst-Plugin-PageCache-0.22.orig/t/13cachehook.t Catalyst-Plugin-PageCache-0.22/t/13cachehook.t
*** Catalyst-Plugin-PageCache-0.22.orig/t/13cachehook.t 2009-04-18 09:14:38.000000000 -0400
--- Catalyst-Plugin-PageCache-0.22/t/13cachehook.t 2010-01-02 17:41:15.000000000 -0500
***************
*** 10,18 ****
use File::Path;
BEGIN {
! eval "use Catalyst::Plugin::Cache::FileCache";
plan $@
! ? ( skip_all => 'needs Catalyst::Plugin::Cache::FileCache for testing' )
: ( tests => 16 );
}
--- 10,18 ----
use File::Path;
BEGIN {
! eval "use Catalyst::Plugin::Cache";
plan $@
! ? ( skip_all => 'needs Catalyst::Plugin::Cache for testing' )
: ( tests => 16 );
}
diff -cr Catalyst-Plugin-PageCache-0.22.orig/t/14keymaker.t Catalyst-Plugin-PageCache-0.22/t/14keymaker.t
*** Catalyst-Plugin-PageCache-0.22.orig/t/14keymaker.t 2009-04-18 09:14:38.000000000 -0400
--- Catalyst-Plugin-PageCache-0.22/t/14keymaker.t 2010-01-02 17:41:25.000000000 -0500
***************
*** 10,18 ****
use File::Path;
BEGIN {
! eval "use Catalyst::Plugin::Cache::FileCache";
plan $@
! ? ( skip_all => 'needs Catalyst::Plugin::Cache::FileCache for testing' )
: ( tests => 8 );
}
--- 10,18 ----
use File::Path;
BEGIN {
! eval "use Catalyst::Plugin::Cache";
plan $@
! ? ( skip_all => 'needs Catalyst::Plugin::Cache for testing' )
: ( tests => 8 );
}
diff -cr Catalyst-Plugin-PageCache-0.22.orig/t/15busy_lock.t Catalyst-Plugin-PageCache-0.22/t/15busy_lock.t
*** Catalyst-Plugin-PageCache-0.22.orig/t/15busy_lock.t 2009-04-18 09:14:38.000000000 -0400
--- Catalyst-Plugin-PageCache-0.22/t/15busy_lock.t 2010-01-02 19:38:28.000000000 -0500
***************
*** 10,18 ****
use Time::HiRes qw(time sleep);
BEGIN {
! eval "use Catalyst::Plugin::Cache::FileCache";
if ( $@ ) {
! plan skip_all => 'needs Catalyst::Plugin::Cache::FileCache for testing';
}
}
--- 10,18 ----
use Time::HiRes qw(time sleep);
BEGIN {
! eval "use Catalyst::Plugin::Cache";
if ( $@ ) {
! plan skip_all => 'needs Catalyst::Plugin::Cache for testing';
}
}
***************
*** 57,60 ****
else {
exit 1;
}
! }
\ No newline at end of file
--- 57,60 ----
else {
exit 1;
}
! }
Only in Catalyst-Plugin-PageCache-0.22/t/lib: .DS_Store
Only in Catalyst-Plugin-PageCache-0.22/t/lib/TestApp: .DS_Store
Only in Catalyst-Plugin-PageCache-0.22.orig/t/lib/TestApp: C
Only in Catalyst-Plugin-PageCache-0.22/t/lib/TestApp: Controller
diff -cr Catalyst-Plugin-PageCache-0.22.orig/t/lib/TestApp.pm Catalyst-Plugin-PageCache-0.22/t/lib/TestApp.pm
*** Catalyst-Plugin-PageCache-0.22.orig/t/lib/TestApp.pm 2009-04-18 09:14:38.000000000 -0400
--- Catalyst-Plugin-PageCache-0.22/t/lib/TestApp.pm 2010-01-02 19:53:59.000000000 -0500
***************
*** 8,20 ****
TestApp->config(
name => 'TestApp',
- cache => {
- storage => 't/var',
- },
counter => 0,
);
! TestApp->setup( qw/Cache::FileCache PageCache/ );
sub default : Private {
my ( $self, $c ) = @_;
--- 8,17 ----
TestApp->config(
name => 'TestApp',
counter => 0,
);
! TestApp->setup( qw/Cache Cache::Store::Memory PageCache/ );
sub default : Private {
my ( $self, $c ) = @_;