Sha256: abe2700a7010e02f3a67a37a8fef2bf1a4acc18de02470c0d4911a24d7b7f11d

Contents?: true

Size: 547 Bytes

Versions: 24

Compression:

Stored size: 547 Bytes

Contents

require 'spec_helper'

describe Internals::Index::File::Marshal 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_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

24 entries across 24 versions & 1 rubygems

Version Path
picky-2.5.2 spec/lib/internals/index/file/marshal_spec.rb
picky-2.5.1 spec/lib/internals/index/file/marshal_spec.rb
picky-2.5.0 spec/lib/internals/index/file/marshal_spec.rb
picky-2.4.3 spec/lib/internals/index/file/marshal_spec.rb
picky-2.4.2 spec/lib/internals/index/file/marshal_spec.rb
picky-2.4.1 spec/lib/internals/index/file/marshal_spec.rb
picky-2.4.0 spec/lib/internals/index/file/marshal_spec.rb
picky-2.3.0 spec/lib/internals/index/file/marshal_spec.rb
picky-2.2.1 spec/lib/internals/index/file/marshal_spec.rb
picky-2.2.0 spec/lib/internals/index/file/marshal_spec.rb
picky-2.1.2 spec/lib/internals/index/file/marshal_spec.rb
picky-2.1.1 spec/lib/internals/index/file/marshal_spec.rb
picky-2.1.0 spec/lib/internals/index/file/marshal_spec.rb
picky-2.0.0 spec/lib/internals/index/file/marshal_spec.rb
picky-2.0.0.pre3 spec/lib/internals/index/file/marshal_spec.rb
picky-2.0.0.pre2 spec/lib/internals/index/file/marshal_spec.rb
picky-2.0.0.pre1 spec/lib/internals/index/file/marshal_spec.rb
picky-1.5.4 spec/lib/internals/index/file/marshal_spec.rb
picky-1.5.3 spec/lib/internals/index/file/marshal_spec.rb
picky-1.5.2 spec/lib/internals/index/file/marshal_spec.rb