aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/caching_test.rb
diff options
context:
space:
mode:
authorrick <rick@spacemonkey.local>2008-04-17 17:22:03 -0700
committerrick <rick@spacemonkey.local>2008-04-17 17:22:03 -0700
commit69d29e80f76079262f2e98e350592be1cfdfcd1e (patch)
treee5b65fae3a5d54c93f660f2b56980acb86d5ff68 /activesupport/test/caching_test.rb
parent750e3217e13f385c5305e5ed9906703412e5667c (diff)
parent82b4faf81218bbd8916ab559590db236c7f80e46 (diff)
downloadrails-69d29e80f76079262f2e98e350592be1cfdfcd1e.tar.gz
rails-69d29e80f76079262f2e98e350592be1cfdfcd1e.tar.bz2
rails-69d29e80f76079262f2e98e350592be1cfdfcd1e.zip
Merge branch 'master' of git@github.com:rails/rails
Diffstat (limited to 'activesupport/test/caching_test.rb')
-rw-r--r--activesupport/test/caching_test.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/activesupport/test/caching_test.rb b/activesupport/test/caching_test.rb
index a038f29f53..09b56525e0 100644
--- a/activesupport/test/caching_test.rb
+++ b/activesupport/test/caching_test.rb
@@ -18,6 +18,19 @@ class CacheStoreSettingTest < Test::Unit::TestCase
assert_kind_of(ActiveSupport::Cache::MemCacheStore, store)
assert_equal %w(localhost), store.addresses
end
+
+ def test_mem_cache_fragment_cache_store_with_multiple_servers
+ store = ActiveSupport::Cache.lookup_store :mem_cache_store, "localhost", '192.168.1.1'
+ assert_kind_of(ActiveSupport::Cache::MemCacheStore, store)
+ assert_equal %w(localhost 192.168.1.1), store.addresses
+ end
+
+ def test_mem_cache_fragment_cache_store_with_options
+ store = ActiveSupport::Cache.lookup_store :mem_cache_store, "localhost", '192.168.1.1', :namespace => 'foo'
+ assert_kind_of(ActiveSupport::Cache::MemCacheStore, store)
+ assert_equal %w(localhost 192.168.1.1), store.addresses
+ assert_equal 'foo', store.instance_variable_get('@data').instance_variable_get('@namespace')
+ end
def test_object_assigned_fragment_cache_store
store = ActiveSupport::Cache.lookup_store ActiveSupport::Cache::FileStore.new("/path/to/cache/directory")