Sha256: 9e72b93f6c95559446bac493be955439eff8982b336d6cc48e081c4a6f12bc1e

Contents?: true

Size: 766 Bytes

Versions: 2

Compression:

Stored size: 766 Bytes

Contents

require 'spec_helper'

describe RenuoCmsRails::Cache do
  describe '#cache' do
    it 'returns a cache instance' do
      expect(described_class.cache).to be_a(RenuoCmsRails::Cache::Cacher)
    end

    it 'returns the same instance two times' do
      expect(described_class.cache).to be(described_class.cache)
    end
  end

  describe '#initialize_cache' do
    it 'delegates the method call initialize_cache to the cacher' do
      expect(described_class.cache).to receive(:initialize_cache)
      described_class.initialize_cache
    end
  end

  describe '#get' do
    it 'delegates the method call get(key) to the cacher' do
      expect(described_class.cache).to receive(:get).with('content.path')
      described_class.get('content.path')
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
renuo-cms-rails-0.2.1 spec/renuo_cms_rails/cache_spec.rb
renuo-cms-rails-0.2.0 spec/renuo_cms_rails/cache_spec.rb