Sha256: 2fd5c9d04905ebbe37485ea34b8255f8779d75ddeef211e2c7d9f961940a72f2

Contents?: true

Size: 537 Bytes

Versions: 60

Compression:

Stored size: 537 Bytes

Contents

require '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

60 entries across 60 versions & 3 rubygems

Version Path
classiccms-0.7.5 vendor/bundle/gems/dragonfly-0.9.12/spec/dragonfly/simple_cache_spec.rb
classiccms-0.7.4 vendor/bundle/gems/dragonfly-0.9.12/spec/dragonfly/simple_cache_spec.rb
classiccms-0.7.3 vendor/bundle/gems/dragonfly-0.9.12/spec/dragonfly/simple_cache_spec.rb
classiccms-0.7.2 vendor/bundle/gems/dragonfly-0.9.12/spec/dragonfly/simple_cache_spec.rb
classiccms-0.7.1 vendor/bundle/gems/dragonfly-0.9.12/spec/dragonfly/simple_cache_spec.rb
classiccms-0.7.0 vendor/bundle/gems/dragonfly-0.9.12/spec/dragonfly/simple_cache_spec.rb
dragonfly-0.9.15 spec/dragonfly/simple_cache_spec.rb
dragonfly-0.9.14 spec/dragonfly/simple_cache_spec.rb
dragonfly-0.9.13 spec/dragonfly/simple_cache_spec.rb
classiccms-0.6.9 vendor/bundle/gems/dragonfly-0.9.12/spec/dragonfly/simple_cache_spec.rb
classiccms-0.6.8 vendor/bundle/gems/dragonfly-0.9.12/spec/dragonfly/simple_cache_spec.rb
classiccms-0.6.7 vendor/bundle/gems/dragonfly-0.9.12/spec/dragonfly/simple_cache_spec.rb
classiccms-0.6.6 vendor/bundle/gems/dragonfly-0.9.12/spec/dragonfly/simple_cache_spec.rb
classiccms-0.6.5 vendor/bundle/gems/dragonfly-0.9.12/spec/dragonfly/simple_cache_spec.rb
classiccms-0.6.4 vendor/bundle/gems/dragonfly-0.9.12/spec/dragonfly/simple_cache_spec.rb
classiccms-0.6.3 vendor/bundle/gems/dragonfly-0.9.12/spec/dragonfly/simple_cache_spec.rb
classiccms-0.6.2 vendor/bundle/gems/dragonfly-0.9.12/spec/dragonfly/simple_cache_spec.rb
classiccms-0.6.1 vendor/bundle/gems/dragonfly-0.9.12/spec/dragonfly/simple_cache_spec.rb
classiccms-0.6.0 vendor/bundle/gems/dragonfly-0.9.12/spec/dragonfly/simple_cache_spec.rb
classiccms-0.5.17 vendor/bundle/gems/dragonfly-0.9.12/spec/dragonfly/simple_cache_spec.rb