aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/caching_test.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2008-04-20 15:30:41 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2008-04-20 15:30:41 -0700
commit3b93ca221d3a1b777bd880c18f52010cbd56c18c (patch)
tree7b49713994125de123775102eac2655d7b29b231 /activesupport/test/caching_test.rb
parentdaab53d8c0bca1114c1485d0dcc52858a264ab9e (diff)
parent46ab7422d9ebac0d529f71a3a7c2feaf0b9d5dbd (diff)
downloadrails-3b93ca221d3a1b777bd880c18f52010cbd56c18c.tar.gz
rails-3b93ca221d3a1b777bd880c18f52010cbd56c18c.tar.bz2
rails-3b93ca221d3a1b777bd880c18f52010cbd56c18c.zip
Merge commit 'rails/master'
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")