test/test_zache.rb in zache-0.3.1 vs test/test_zache.rb in zache-0.4.0

- old
+ new

@@ -155,10 +155,17 @@ cache.remove_all assert(cache.exists?(:hey) == false) assert(cache.exists?(:bye) == false) end + def test_puts_something_in + cache = Zache.new(sync: false) + cache.get(:hey) { Random.rand } + cache.put(:hey, 123) + assert_equal(123, cache.get(:hey)) + end + def test_sync_zache_is_reentrant cache = Zache.new - cache.get(:first) { cache.get(:second) { 1 } } + cache.get(:first) { cache.get(:second) { cache.get(:third) { 1 } } } end end