Sha256: bd1202db69aeb1bfa12e87a4139536ca09250c6aeb5f85e7a00e2b881ea35a46

Contents?: true

Size: 529 Bytes

Versions: 26

Compression:

Stored size: 529 Bytes

Contents

require File.expand_path("../../spec_helper", __FILE__)

describe "Friendly::Cache" do
  describe "getting a cache object for :id" do
    before do
      @cache = Friendly::Cache.cache_for(stub, [:id], {})
    end

    it "instantiates a Cache::ByID" do
      @cache.should be_instance_of(Friendly::Cache::ByID)
    end
  end

  describe "for other fields" do
    it "raises NotSupported" do
      lambda {
        Friendly::Cache.cache_for(stub, [:asdf], {})
      }.should raise_error(Friendly::NotSupported)
    end
  end
end

Version data entries

26 entries across 26 versions & 7 rubygems

Version Path
ihoka-friendly-0.8.0.pre spec/unit/cache_spec.rb
ihoka-friendly-0.7.1.2 spec/unit/cache_spec.rb
ihoka-friendly-0.7.1.1 spec/unit/cache_spec.rb
ihoka-friendly-0.7.1 spec/unit/cache_spec.rb
ihoka-friendly-0.7.0 spec/unit/cache_spec.rb
friendly-0.6.0 spec/unit/cache_spec.rb
honkster-friendly-0.5.3 spec/unit/cache_spec.rb
honkster-friendly-0.5.2 spec/unit/cache_spec.rb
honkster-friendly-0.5.1 spec/unit/cache_spec.rb
wayne-friendly-0.5.1 spec/unit/cache_spec.rb
wego-friendly-0.5.1 spec/unit/cache_spec.rb
arunthampi-friendly-0.5.1 spec/unit/cache_spec.rb
friendly_postgres-0.5.1 spec/unit/cache_spec.rb
friendly-0.5.1 spec/unit/cache_spec.rb
friendly-0.5.0 spec/unit/cache_spec.rb
friendly_postgres-0.4.5 spec/unit/cache_spec.rb
friendly-0.4.5 spec/unit/cache_spec.rb
friendly-0.4.4 spec/unit/cache_spec.rb
friendly_postgres-0.4.3 spec/unit/cache_spec.rb
friendly-0.4.3 spec/unit/cache_spec.rb