diff options
author | Guillermo Iguaran <guilleiguaran@gmail.com> | 2012-06-28 21:47:46 -0500 |
---|---|---|
committer | Guillermo Iguaran <guilleiguaran@gmail.com> | 2012-08-17 22:22:55 -0500 |
commit | 82663306f428a5bbc90c511458432afb26d2f238 (patch) | |
tree | fd995748b7bf754f62f2886b24ad279ac2d48cd7 /activesupport/test/caching_test.rb | |
parent | 366eb7216edd4515d4c5491df6868dbf9fecd261 (diff) | |
download | rails-82663306f428a5bbc90c511458432afb26d2f238.tar.gz rails-82663306f428a5bbc90c511458432afb26d2f238.tar.bz2 rails-82663306f428a5bbc90c511458432afb26d2f238.zip |
Replace deprecated `memcache-client` gem with `dalli` in ActiveSupport::Cache::MemCacheStore
memcache-client was deprecated in favour of dalli in 2010.
Diffstat (limited to 'activesupport/test/caching_test.rb')
-rw-r--r-- | activesupport/test/caching_test.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/activesupport/test/caching_test.rb b/activesupport/test/caching_test.rb index a75db47be8..36efa73e62 100644 --- a/activesupport/test/caching_test.rb +++ b/activesupport/test/caching_test.rb @@ -83,20 +83,20 @@ class CacheStoreSettingTest < ActiveSupport::TestCase end def test_mem_cache_fragment_cache_store - MemCache.expects(:new).with(%w[localhost], {}) + Dalli::Client.expects(:new).with(%w[localhost], {}) store = ActiveSupport::Cache.lookup_store :mem_cache_store, "localhost" assert_kind_of(ActiveSupport::Cache::MemCacheStore, store) end def test_mem_cache_fragment_cache_store_with_given_mem_cache - mem_cache = MemCache.new - MemCache.expects(:new).never + mem_cache = Dalli::Client.new + Dalli::Client.expects(:new).never store = ActiveSupport::Cache.lookup_store :mem_cache_store, mem_cache assert_kind_of(ActiveSupport::Cache::MemCacheStore, store) end def test_mem_cache_fragment_cache_store_with_given_mem_cache_like_object - MemCache.expects(:new).never + Dalli::Client.expects(:new).never memcache = Object.new def memcache.get() true end store = ActiveSupport::Cache.lookup_store :mem_cache_store, memcache @@ -104,13 +104,13 @@ class CacheStoreSettingTest < ActiveSupport::TestCase end def test_mem_cache_fragment_cache_store_with_multiple_servers - MemCache.expects(:new).with(%w[localhost 192.168.1.1], {}) + Dalli::Client.expects(:new).with(%w[localhost 192.168.1.1], {}) store = ActiveSupport::Cache.lookup_store :mem_cache_store, "localhost", '192.168.1.1' assert_kind_of(ActiveSupport::Cache::MemCacheStore, store) end def test_mem_cache_fragment_cache_store_with_options - MemCache.expects(:new).with(%w[localhost 192.168.1.1], { :timeout => 10 }) + Dalli::Client.expects(:new).with(%w[localhost 192.168.1.1], { :timeout => 10 }) store = ActiveSupport::Cache.lookup_store :mem_cache_store, "localhost", '192.168.1.1', :namespace => 'foo', :timeout => 10 assert_kind_of(ActiveSupport::Cache::MemCacheStore, store) assert_equal 'foo', store.options[:namespace] |