Sha256: defa76c72585b0e3c7d989a08423151c58aa61011afb74cfd72850799ebae4be

Contents?: true

Size: 542 Bytes

Versions: 5

Compression:

Stored size: 542 Bytes

Contents

require 'spec/spec_helper'

describe Scrooge::Storage::Memory do
  
  before(:each) do
    @memory = Scrooge::Storage::Memory.new
    @tracker = mock('tracker')
    @tracker.stub!(:signature).and_return('signature')
  end
  
   it "should be able to write a tracker to memory" do
     lambda { @memory.write( @tracker ) }.should change( @memory.storage, :size ).from(0).to(1)
   end
   
   it "should be able to read itself from memory" do
      @memory.write( @tracker )
      @memory.read( @tracker ).should eql( @tracker )
   end
   
end  

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
methodmissing-scrooge-1.0.0 spec/units/scrooge/storage/memory_spec.rb
methodmissing-scrooge-1.0.1 spec/units/scrooge/storage/memory_spec.rb
methodmissing-scrooge-1.0.2 spec/units/scrooge/storage/memory_spec.rb
methodmissing-scrooge-1.0.3 spec/units/scrooge/storage/memory_spec.rb
methodmissing-scrooge-1.0.4 spec/units/scrooge/storage/memory_spec.rb