Sha256: a37aa5c95aa40bbe008e8d29483fe71b40829301b54a563e5080cfe2a908a544
Contents?: true
Size: 751 Bytes
Versions: 2
Compression:
Stored size: 751 Bytes
Contents
# encoding: utf-8 require File.dirname(__FILE__) + '/../spec_helper' describe Backup::Storage::Base do let(:base) { Backup::Storage::Base.new } it do storage_object = mock Backup::Storage::Object.expects(:new).with('Base').returns(storage_object) storage_object.stubs(:load).returns([]) storage_object.expects(:write) base.keep = 1 base.cycle! end it do base.keep = 3 storage_object = mock objects = %w[1 2 3 4].map { Backup::Storage::Base.new } Backup::Storage::Object.expects(:new).with('Base').returns(storage_object) storage_object.stubs(:load).returns(objects) storage_object.expects(:write) Backup::Storage::Base.any_instance.expects(:remove!).times(2) base.cycle! end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
backup-3.0.19 | spec/storage/base_spec.rb |
backup-3.0.18 | spec/storage/base_spec.rb |