Sha256: fc5cae009826863d9f118ba18a0d3111ecc957704cd3088fabb0cf37c83f55f8
Contents?: true
Size: 805 Bytes
Versions: 22
Compression:
Stored size: 805 Bytes
Contents
# encoding: utf-8 require File.dirname(__FILE__) + '/../spec_helper' describe Backup::Storage::Base do let(:base) { Backup::Storage::Base.new } before do Backup::Logger.stubs(:message) end 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
22 entries across 22 versions & 3 rubygems