Sha256: e142b9db72bb99b4cec6a341f17d2c2ca12da18d4089c2d61f6094ccfccccbbe
Contents?: true
Size: 425 Bytes
Versions: 9
Compression:
Stored size: 425 Bytes
Contents
require 'spec_helper' require 'redpomo/file_cache' require 'tempfile' describe Redpomo::FileCache do describe "#get" do it "executes the block on cache miss" do Redpomo::FileCache.instance.cache_path = Tempfile.new('cache').path counter = Redpomo::FileCache.get("foobar") { 5 } counter.should == 5 counter = Redpomo::FileCache.get("foobar") { 10 } counter.should == 5 end end end
Version data entries
9 entries across 9 versions & 1 rubygems