diff options
-rw-r--r-- | actionpack/test/controller/fragment_store_setting_test.rb | 18 | ||||
-rw-r--r-- | actionpack/test/controller/session/mem_cache_store_test.rb | 2 |
2 files changed, 12 insertions, 8 deletions
diff --git a/actionpack/test/controller/fragment_store_setting_test.rb b/actionpack/test/controller/fragment_store_setting_test.rb index cb872f6505..3df6fd0be2 100644 --- a/actionpack/test/controller/fragment_store_setting_test.rb +++ b/actionpack/test/controller/fragment_store_setting_test.rb @@ -24,14 +24,16 @@ class FragmentCacheStoreSettingTest < Test::Unit::TestCase ) assert_equal "druby://localhost:9192", ActionController::Base.fragment_cache_store.address end - - def test_mem_cache_fragment_cache_store - ActionController::Base.fragment_cache_store = :mem_cache_store, "localhost" - assert_kind_of( - ActionController::Caching::Fragments::MemCacheStore, - ActionController::Base.fragment_cache_store - ) - assert_equal %w(localhost), ActionController::Base.fragment_cache_store.addresses + + if defined? CGI::Session::MemCacheStore + def test_mem_cache_fragment_cache_store + ActionController::Base.fragment_cache_store = :mem_cache_store, "localhost" + assert_kind_of( + ActionController::Caching::Fragments::MemCacheStore, + ActionController::Base.fragment_cache_store + ) + assert_equal %w(localhost), ActionController::Base.fragment_cache_store.addresses + end end def test_object_assigned_fragment_cache_store diff --git a/actionpack/test/controller/session/mem_cache_store_test.rb b/actionpack/test/controller/session/mem_cache_store_test.rb index 1fd2d0cd75..3afb7a8ea9 100644 --- a/actionpack/test/controller/session/mem_cache_store_test.rb +++ b/actionpack/test/controller/session/mem_cache_store_test.rb @@ -11,6 +11,7 @@ end uses_mocha 'MemCacheStore tests' do +if defined? MemCache::MemCacheError class MemCacheStoreTest < Test::Unit::TestCase SESSION_KEY_RE = /^session:[0-9a-z]+/ @@ -177,4 +178,5 @@ class MemCacheStoreTest < Test::Unit::TestCase end end +end # defined? MemCache end # uses_mocha |