Sha256: 23aedc74bc813a485ad6cb07d9a453ad7515c924d0ea851c196c4a920de72cf3

Contents?: true

Size: 635 Bytes

Versions: 62

Compression:

Stored size: 635 Bytes

Contents

require 'test_helper'
require 'redis/store'

module Workarea
  class AutoexpireCacheRedisTest < TestCase
    setup :setup_redis
    teardown :clear_redis

    def test_get
      assert_equal('bar', @store[@key])
    end

    def test_set
      assert(@store[@key] = 'foo')
    end

    def test_keys
      refute_empty @store.keys
    end

    def test_del
      assert @store.del(@key)
    end

    private

    def setup_redis
      @key = 'http://example.com'
      Workarea.redis.set(@key, 'bar')
      @store = AutoexpireCacheRedis.new(Workarea.redis)
    end

    def clear_redis
      Workarea.redis.del(@key)
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-core-3.5.27 test/lib/workarea/autoexpire_cache_redis_test.rb
workarea-core-3.5.26 test/lib/workarea/autoexpire_cache_redis_test.rb
workarea-core-3.4.45 test/lib/workarea/autoexpire_cache_redis_test.rb
workarea-core-3.5.25 test/lib/workarea/autoexpire_cache_redis_test.rb
workarea-core-3.5.23 test/lib/workarea/autoexpire_cache_redis_test.rb
workarea-core-3.4.44 test/lib/workarea/autoexpire_cache_redis_test.rb
workarea-core-3.5.22 test/lib/workarea/autoexpire_cache_redis_test.rb
workarea-core-3.4.43 test/lib/workarea/autoexpire_cache_redis_test.rb
workarea-core-3.5.21 test/lib/workarea/autoexpire_cache_redis_test.rb
workarea-core-3.4.42 test/lib/workarea/autoexpire_cache_redis_test.rb
workarea-core-3.5.20 test/lib/workarea/autoexpire_cache_redis_test.rb
workarea-core-3.4.41 test/lib/workarea/autoexpire_cache_redis_test.rb
workarea-core-3.5.19 test/lib/workarea/autoexpire_cache_redis_test.rb
workarea-core-3.4.40 test/lib/workarea/autoexpire_cache_redis_test.rb
workarea-core-3.5.18 test/lib/workarea/autoexpire_cache_redis_test.rb
workarea-core-3.4.39 test/lib/workarea/autoexpire_cache_redis_test.rb
workarea-core-3.5.17 test/lib/workarea/autoexpire_cache_redis_test.rb
workarea-core-3.4.38 test/lib/workarea/autoexpire_cache_redis_test.rb
workarea-core-3.5.16 test/lib/workarea/autoexpire_cache_redis_test.rb
workarea-core-3.4.37 test/lib/workarea/autoexpire_cache_redis_test.rb