Sha256: 0a287a4236bad9772f2aa77f7f50fbd9164e8718aeb449132a66f47d7df932fb

Contents?: true

Size: 1.11 KB

Versions: 71

Compression:

Stored size: 1.11 KB

Contents

require 'spec_helper'

describe Picky::Backends::Memory::Basic do

  context 'without options' do
    let(:basic) { described_class.new 'some/cache/path/to/file' }

    describe 'empty' do
      it 'returns the container that is used for indexing' do
        basic.empty.should == {}
      end
    end

    describe 'initial' do
      it 'returns the container that is used for indexing' do
        basic.initial.should == {}
      end
    end

    describe 'to_s' do
      it 'returns the cache path with the default file extension' do
        basic.to_s.should == 'Picky::Backends::Memory::Basic(some/cache/path/to/file.memory.index)'
      end
    end
  end

  context 'with options' do
    let(:basic) do
      described_class.new 'some/cache/path/to/file',
                          empty: [],
                          initial: []
    end

    describe 'empty' do
      it 'returns the container that is used for indexing' do
        basic.empty.should == []
      end
    end

    describe 'initial' do
      it 'returns the container that is used for indexing' do
        basic.initial.should == []
      end
    end
  end

end

Version data entries

71 entries across 71 versions & 1 rubygems

Version Path
picky-3.6.11 spec/lib/backends/memory/basic_spec.rb
picky-3.6.10 spec/lib/backends/memory/basic_spec.rb
picky-3.6.9 spec/lib/backends/memory/basic_spec.rb
picky-3.6.8 spec/lib/backends/memory/basic_spec.rb
picky-3.6.7 spec/lib/backends/memory/basic_spec.rb
picky-3.6.6 spec/lib/backends/memory/basic_spec.rb
picky-3.6.4 spec/lib/backends/memory/basic_spec.rb
picky-3.6.3 spec/lib/backends/memory/basic_spec.rb
picky-3.6.2 spec/lib/backends/memory/basic_spec.rb
picky-3.6.1 spec/lib/backends/memory/basic_spec.rb
picky-3.6.0 spec/lib/backends/memory/basic_spec.rb