Sha256: c7adabaad5c2a0b820eb97ffcda479c06ba281152b67f4334a288444a0a6d4ee

Contents?: true

Size: 706 Bytes

Versions: 6

Compression:

Stored size: 706 Bytes

Contents

require File.dirname(__FILE__) + '/test_helper.rb'

class NamedCacheTest < Test::Unit::TestCase
  
  def setup
    @request = mock
  end
  
  def test_key_for_in_basic_case
    create_named_cache
    assert_equal 'test_cache//[]', @named_cache.send(:key_for, @request)
    assert_equal 'test_cache/suf/[]', @named_cache.send(:key_for, @request, 'suf')
  end
  
  def test_key_with_qualifiers
    
  end
  
  protected
  
  def create_named_cache(options={})
    @name = options[:name] || 'test_cache'
    @params = {}
    @cache = CacheAdvance::CacheMock.new
    @cache_set = CacheAdvance::CacheSet.new(@cache)
    @named_cache = CacheAdvance::NamedCache.new(@name, @params, @cache_set, @cache)
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
aub-cache_advance-1.1.2 test/named_cache_test.rb
aub-cache_advance-1.1.3 test/named_cache_test.rb
cache_advance-2.0.1 test/named_cache_test.rb
cache_advance-2.0.0 test/named_cache_test.rb
cache_advance-1.1.5 test/named_cache_test.rb
cache_advance-1.1.4 test/named_cache_test.rb