From 4a9a46f3288cd32676422df29aacdefe094fdd78 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Sun, 2 May 2010 00:27:32 -0700 Subject: [PATCH] Add missing module to Cache::CHI. Fix tests to add a cache config if the current config file does not have one. --- lib/WebGUI/Cache/CHI.pm | 1 + t/Cache/CHI.t | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/WebGUI/Cache/CHI.pm b/lib/WebGUI/Cache/CHI.pm index e6abe29e1..76cb65d87 100644 --- a/lib/WebGUI/Cache/CHI.pm +++ b/lib/WebGUI/Cache/CHI.pm @@ -2,6 +2,7 @@ package WebGUI::Cache::CHI; use strict; use base 'WebGUI::Cache'; +use File::Temp qw/tempdir/; use CHI; =head1 NAME diff --git a/t/Cache/CHI.t b/t/Cache/CHI.t index 3ab0110d4..1299df88c 100644 --- a/t/Cache/CHI.t +++ b/t/Cache/CHI.t @@ -34,6 +34,10 @@ plan tests => 3; # Increment this number for each test you create # put your tests here use_ok( 'WebGUI::Cache::CHI' ); +WebGUI::Test->originalConfig('cacheType'); +WebGUI::Test->originalConfig('cache'); +$session->config->set('cacheType', 'WebGUI::Cache::CHI'); +$session->config->set('cache', { driver => 'FastMmap', }); my $cache = WebGUI::Cache::CHI->new($session, "this", "that"); my $testValue = "a rock that has no earthly business in that field"; @@ -43,5 +47,4 @@ is($cache->get, $testValue, "set/get works"); $cache->delete; is($cache->get, undef, "delete works"); - #vim:ft=perl