Cleanups
[catagits/Catalyst-Plugin-Cache.git] / t / key_regexes.t
index afeb79e..5598a43 100644 (file)
@@ -3,10 +3,10 @@
 use strict;
 use warnings;
 
-use Test::More 'no_plan';
+use Test::More;
 
-use ok "Catalyst::Plugin::Cache";
-use ok "Catalyst::Plugin::Cache::Choose::KeyRegexes";
+use_ok "Catalyst::Plugin::Cache";
+use_ok "Catalyst::Plugin::Cache::Choose::KeyRegexes";
 
 use Catalyst::Plugin::Cache::Backend::Memory;
 
@@ -15,11 +15,15 @@ use Catalyst::Plugin::Cache::Backend::Memory;
     use base qw/Catalyst::Plugin::Cache Catalyst::Plugin::Cache::Choose::KeyRegexes/;
 
     our %config = (
-        cache => {
+        'Plugin::Cache' => {
             key_regexes => [
                 qr/^foo/ => "foo_store",
                 qr/^bar/ => "bar_store",
             ],
+            ### as of 0.06, you must specify a backend
+            backend => { 
+                class   => 'Catalyst::Plugin::Cache::Backend::Memory',
+            }
         },
     );
     sub config { \%config }
@@ -55,4 +59,5 @@ is( $c->get_cache_backend("bar_store")->get("baz_laa"), undef, "no non match in
 is( $c->get_cache_backend("bar_store")->get("foo_laa"), undef, "no foo key" );
 is( $c->get_cache_backend("bar_store")->get("bar_laa"), "laa", "has bar key" );
 
+done_testing;