Cleanups
[catagits/Catalyst-Plugin-Cache.git] / t / currying_conf.t
index 005c66e..df5f049 100644 (file)
@@ -3,30 +3,37 @@
 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 {}
@@ -50,3 +57,5 @@ cmp_deeply( { @{ $c->cache("foo")->meta } }, superhashof({ bah => "foo" }), "met
 
 is( refaddr( $c->cache("bar") ), refaddr( $c->cache("bar") ), "since bar is hard coded as an object it's always the same" );
 
+done_testing;
+