diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-10-15 01:47:35 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-10-15 01:47:35 +0000 |
commit | 86a9c212c09546a93b72970adf07ce9fba0d8d8e (patch) | |
tree | e9978081dadcc257424986be148d92714c86ed67 /actionpack | |
parent | 03d2b6ce82fda3f1b63de1febb88a121e1ced61a (diff) | |
download | rails-86a9c212c09546a93b72970adf07ce9fba0d8d8e.tar.gz rails-86a9c212c09546a93b72970adf07ce9fba0d8d8e.tar.bz2 rails-86a9c212c09546a93b72970adf07ce9fba0d8d8e.zip |
Skip memcache tests unless it's installed
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7893 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack')
-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 |