Sha256: a1be5cf598aefa40d3d83dc5d69d4da453bcc7ddfdc293dde5021694fcc092bc

Contents?: true

Size: 523 Bytes

Versions: 1

Compression:

Stored size: 523 Bytes

Contents

require 'spec_helper'

describe Backend::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

1 entries across 1 versions & 1 rubygems

Version Path
picky-2.6.0 spec/lib/backend/file/json_spec.rb