use strict;
use warnings;
-use Test::More 'no_plan';
+use Test::More;
use Test::Deep qw/superhashof cmp_deeply/;
use Scalar::Util qw/refaddr/;
-use ok "Catalyst::Plugin::Cache";
+use_ok "Catalyst::Plugin::Cache";
{
package MockApp;
use base qw/Catalyst::Plugin::Cache/;
my %config = (
- cache => {
+ 'Plugin::Cache' => {
profiles => {
foo => {
bah => "foo",
},
bar => bless( {}, "SomeClass" ),
},
+ ### as of 0.06, we need a specific backend
+ ### specified
+ backend => {
+ class => 'SomeClass',
+ }
},
);
sub config { \%config };
package SomeClass;
+ ### backend must have a constructor
+ sub new { bless {}, shift };
sub get {}
sub set {}
sub remove {}
is( refaddr( $c->cache("bar") ), refaddr( $c->cache("bar") ), "since bar is hard coded as an object it's always the same" );
+done_testing;
+