Skip to content
Browse files

Skip memcache tests unless it's installed

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7893 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 03d2b6c commit 86a9c212c09546a93b72970adf07ce9fba0d8d8e @jeremy jeremy committed Oct 15, 2007
View
18 actionpack/test/controller/fragment_store_setting_test.rb
@@ -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
View
2 actionpack/test/controller/session/mem_cache_store_test.rb
@@ -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

0 comments on commit 86a9c21

Please sign in to comment.
Something went wrong with that request. Please try again.