Sha256: e4ef1368191bbf112adc9185ccdcb9b2045296294dbeb3766710c162ff24e709

Contents?: true

Size: 541 Bytes

Versions: 37

Compression:

Stored size: 541 Bytes

Contents

require 'spec_helper'

describe Index::File::Marshal do
  
  before(:each) do
    @file = Index::File::Marshal.new "some_cache_path"
  end
  
  describe "dump" do
    it "delegates to the given hash" do
      hash = stub :hash
      
      hash.should_receive(:dump_marshalled).once.with "some_cache_path.dump"
      
      @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

37 entries across 37 versions & 1 rubygems

Version Path
picky-1.0.0 spec/lib/index/file/marshal_spec.rb
picky-0.12.3 spec/lib/index/file/marshal_spec.rb
picky-0.12.2 spec/lib/index/file/marshal_spec.rb
picky-0.12.1 spec/lib/index/file/marshal_spec.rb
picky-0.12.0 spec/lib/index/file/marshal_spec.rb
picky-0.11.2 spec/lib/index/file/marshal_spec.rb
picky-0.11.1 spec/lib/index/file/marshal_spec.rb
picky-0.11.0 spec/lib/index/file/marshal_spec.rb
picky-0.10.5 spec/lib/index/file/marshal_spec.rb
picky-0.10.4 spec/lib/index/file/marshal_spec.rb
picky-0.10.2 spec/lib/index/file/marshal_spec.rb
picky-0.10.1 spec/lib/index/file/marshal_spec.rb
picky-0.10.0 spec/lib/index/file/marshal_spec.rb
picky-0.9.4 spec/lib/index/file/marshal_spec.rb
picky-0.9.3 spec/lib/index/file/marshal_spec.rb
picky-0.9.2 spec/lib/index/file/marshal_spec.rb
picky-0.9.1 spec/lib/index/file/marshal_spec.rb