Sha256: b1e2e2b277b6d4b2353629c6bcba965c0fb87ca1effd49cff0456e910842c61f

Contents?: true

Size: 529 Bytes

Versions: 11

Compression:

Stored size: 529 Bytes

Contents

require 'spec_helper'

describe Index::File::JSON do
  
  before(:each) do
    @file = Index::File::JSON.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 marshalled file. Use text file.")
    end
  end
  
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
picky-0.11.1 spec/lib/index/file/json_spec.rb
picky-0.11.0 spec/lib/index/file/json_spec.rb
picky-0.10.5 spec/lib/index/file/json_spec.rb
picky-0.10.4 spec/lib/index/file/json_spec.rb
picky-0.10.2 spec/lib/index/file/json_spec.rb
picky-0.10.1 spec/lib/index/file/json_spec.rb
picky-0.10.0 spec/lib/index/file/json_spec.rb
picky-0.9.4 spec/lib/index/file/json_spec.rb
picky-0.9.3 spec/lib/index/file/json_spec.rb
picky-0.9.2 spec/lib/index/file/json_spec.rb
picky-0.9.1 spec/lib/index/file/json_spec.rb