Skip memcache tests unless it's installed
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7893 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
03d2b6ce82
commit
86a9c212c0
@ -24,14 +24,16 @@ def test_drb_fragment_cache_store
|
||||
)
|
||||
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
|
||||
|
@ -11,6 +11,7 @@ def cache
|
||||
|
||||
|
||||
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 @@ def with_cgi
|
||||
end
|
||||
end
|
||||
|
||||
end # defined? MemCache
|
||||
end # uses_mocha
|
||||
|
Loading…
Reference in New Issue
Block a user