Sha256: 25fb5e1cd4d1c1bc0886fc16648881203eb6a4cd3330f2552d00aaea933555a2
Contents?: true
Size: 958 Bytes
Versions: 15
Compression:
Stored size: 958 Bytes
Contents
require 'assert' require 'dassets/cache' module Dassets::Cache class UnitTests < Assert::Context desc "Dassets::Cache" should "define an in-memory cache handler" do assert MemCache end should "define a no-op cache handler" do assert NoCache end end class MemCacheTests < UnitTests desc "MemCache" setup do @cache = MemCache.new end subject{ @cache } should have_imeths :keys, :[], :[]= should "cache given key/value pairs in memory" do val = [] subject['something'] = val assert_same val, subject['something'] end end class NoCacheTests < UnitTests desc "NoCache" setup do @cache = NoCache.new end subject{ @cache } should have_imeths :keys, :[], :[]= should "not cache given key/value pairs in memory" do val = [] subject['something'] = val assert_not_same val, subject['something'] end end end
Version data entries
15 entries across 15 versions & 1 rubygems