Sha256: 434cf287d7c40048d9091827400fa286fc8345b495045bfa822ba6a34dcb224b

Contents?: true

Size: 532 Bytes

Versions: 24

Compression:

Stored size: 532 Bytes

Contents

require 'spec_helper'

describe Internals::Index::File::JSON do
  
  before(:each) do
    @file = described_class.new "some_cache_path"
  end
  
  describe "dump" do
    it "delegates to the given hash" do
      hash = stub :hash
      
      hash.should_receive(:dump_json).once.with "some_cache_path.json"
      
      @file.dump hash
    end
  end
  describe "retrieve" do
    it "raises" do
      lambda do
        @file.retrieve
      end.should raise_error("Can't retrieve from JSON file. Use text file.")
    end
  end
  
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
picky-1.5.1 spec/lib/internals/index/file/json_spec.rb
picky-1.5.0 spec/lib/internals/index/file/json_spec.rb
picky-1.4.3 spec/lib/internals/index/file/json_spec.rb
picky-1.4.2 spec/lib/internals/index/file/json_spec.rb