Sha256: 692fb2d43aa386226a9dbe3f5f5c606bd567000e20e7997f021c10dbf05b2cb4

Contents?: true

Size: 729 Bytes

Versions: 13

Compression:

Stored size: 729 Bytes

Contents

require 'test_helper'

class CacheFileStoreTest < ActiveSupport::TestCase
  
  def setup
    super
    @cachepath = Dir.mktmpdir
    @env.cache = Condenser::Cache::FileStore.new(@cachepath)
  end
  
  def teardown
    super
    FileUtils.remove_entry(@cachepath, true)
  end

  test 'reading from a populated cache store' do
    file 'test.txt.erb', "1<%= 1 + 1 %>3\n"
    
    assert_file 'test.txt', 'text/plain', <<~CSS
    123
    CSS

    oldenv = @env
    begin
      @env = Condenser.new(@path)
      @env.cache = Condenser::Cache::FileStore.new(@cachepath)
      Condenser::Erubi.stubs(:call).never

      assert_file 'test.txt', 'text/plain', <<~CSS
      123
      CSS
    ensure
      @env = oldenv
    end
  end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
condenser-1.0 test/cache_stores/file_store_test.rb
condenser-1.0.rc1 test/cache_stores/file_store_test.rb
condenser-0.3 test/cache_stores/file_store_test.rb
condenser-0.2 test/cache_stores/file_store_test.rb
condenser-0.1 test/cache_stores/file_store_test.rb
condenser-0.0.12 test/cache_stores/file_store_test.rb
condenser-0.0.11 test/cache_stores/file_store_test.rb
condenser-0.0.10 test/cache_stores/file_store_test.rb
condenser-0.0.9 test/cache_stores/file_store_test.rb
condenser-0.0.8 test/cache_stores/file_store_test.rb
condenser-0.0.7 test/cache_stores/file_store_test.rb
condenser-0.0.5 test/cache_stores/file_store_test.rb
condenser-0.0.4 test/cache_stores/file_store_test.rb