Sha256: b9411f83843ad7e022c424270840863239d53a9cb8e19d33d615c81e2515e967

Contents?: true

Size: 713 Bytes

Versions: 7

Compression:

Stored size: 713 Bytes

Contents

require File.dirname(__FILE__) + '/../spec_helper'

describe PageCache do

  describe 'PageCache#self.sweep_all' do

    before(:each) do
      all_files = ['/index.html', '/articles.rss', '/sitemap.xml']
      @all_paths = []
      all_files.each do |path|
        @all_paths << create_file_in_spec_public_cache_directory(path)
        CacheInformation.create!(:path => path)
      end
    end

    it 'should destroy all file in cache directory with path' do
      PageCache.sweep_all
      @all_paths.each do |path|
        File.should_not be_exist(path)
      end
    end

    it 'should delete all CacheInformation' do
      PageCache.sweep_all
      CacheInformation.all.should be_empty
    end

  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
typo-5.4.4 spec/models/page_cache_spec.rb
typo-5.4.3 spec/models/page_cache_spec.rb
typo-5.4.2 spec/models/page_cache_spec.rb
typo-5.4.1 spec/models/page_cache_spec.rb
typo-5.4 spec/models/page_cache_spec.rb
typo-5.2.98 spec/models/page_cache_spec.rb
typo-5.3 spec/models/page_cache_spec.rb