Sha256: b2541c453e191fc464234cb775c5652cb722c818dae8f23abdd3fbbe91b39a60
Contents?: true
Size: 566 Bytes
Versions: 16
Compression:
Stored size: 566 Bytes
Contents
require File.dirname(__FILE__) + '/../spec_helper' describe Dragonfly::SimpleCache do before(:each) do @cache = Dragonfly::SimpleCache.new(2) end it "should act as a normal hash" do @cache[:egg] = 'four' @cache[:egg].should == 'four' end it "should allow filling up to the limit" do @cache[:a] = 1 @cache[:b] = 2 @cache.should == {:a => 1, :b => 2} end it "should get rid of the first added when full" do @cache[:a] = 1 @cache[:b] = 2 @cache[:c] = 3 @cache.should == {:b => 2, :c => 3} end end
Version data entries
16 entries across 16 versions & 2 rubygems