Methods
- T
-
- test_file_fragment_cache_store,
- test_mem_cache_fragment_cache_store,
- test_mem_cache_fragment_cache_store_with_given_mem_cache,
- test_mem_cache_fragment_cache_store_with_given_mem_cache_like_object,
- test_mem_cache_fragment_cache_store_with_multiple_servers,
- test_mem_cache_fragment_cache_store_with_options,
- test_object_assigned_fragment_cache_store
Instance Public methods
test_file_fragment_cache_store()
Link
# File activesupport/test/caching_test.rb, line 75 def test_file_fragment_cache_store store = ActiveSupport::Cache.lookup_store :file_store, "/path/to/cache/directory" assert_kind_of(ActiveSupport::Cache::FileStore, store) assert_equal "/path/to/cache/directory", store.cache_path end
test_mem_cache_fragment_cache_store()
Link
test_mem_cache_fragment_cache_store_with_given_mem_cache()
Link
# File activesupport/test/caching_test.rb, line 87 def test_mem_cache_fragment_cache_store_with_given_mem_cache mem_cache = MemCache.new MemCache.expects(:new).never store = ActiveSupport::Cache.lookup_store :mem_cache_store, mem_cache assert_kind_of(ActiveSupport::Cache::MemCacheStore, store) end
test_mem_cache_fragment_cache_store_with_given_mem_cache_like_object()
Link
# File activesupport/test/caching_test.rb, line 94 def test_mem_cache_fragment_cache_store_with_given_mem_cache_like_object MemCache.expects(:new).never memcache = Object.new def memcache.get() true end store = ActiveSupport::Cache.lookup_store :mem_cache_store, memcache assert_kind_of(ActiveSupport::Cache::MemCacheStore, store) end
test_mem_cache_fragment_cache_store_with_multiple_servers()
Link
# File activesupport/test/caching_test.rb, line 102 def test_mem_cache_fragment_cache_store_with_multiple_servers MemCache.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
test_mem_cache_fragment_cache_store_with_options()
Link
# File activesupport/test/caching_test.rb, line 108 def test_mem_cache_fragment_cache_store_with_options MemCache.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] end
test_object_assigned_fragment_cache_store()
Link
# File activesupport/test/caching_test.rb, line 115 def test_object_assigned_fragment_cache_store store = ActiveSupport::Cache.lookup_store ActiveSupport::Cache::FileStore.new("/path/to/cache/directory") assert_kind_of(ActiveSupport::Cache::FileStore, store) assert_equal "/path/to/cache/directory", store.cache_path end