Sha256: 8668638c5bf92b9262a1a49a62bc03469ccef5420d98c0bd975f4c8489514593
Contents?: true
Size: 712 Bytes
Versions: 16
Compression:
Stored size: 712 Bytes
Contents
require 'wovnrb/text_caches/cache_base' require 'minitest/autorun' class CacheBaseTest < Minitest::Test def setup Wovnrb::CacheBase.reset_cache end def test_build cache = Wovnrb::CacheBase.build({}) assert_equal('Wovnrb::MemoryCache', cache.class.name) end def test_build_with_invalid_strategy assert_raises RuntimeError do Wovnrb::CacheBase.build(strategy: :invalid) end end def test_set_and_get_single Wovnrb::CacheBase.set_single({}) cache = Wovnrb::CacheBase.get_single assert_equal('Wovnrb::MemoryCache', cache.class.name) end def test_get_single_without_set assert_raises RuntimeError do Wovnrb::CacheBase.get_single end end end
Version data entries
16 entries across 16 versions & 1 rubygems