spec/cli/rotate_spec.rb in heirloom-0.11.2 vs spec/cli/rotate_spec.rb in heirloom-0.12.0
- old
+ new
@@ -16,10 +16,12 @@
catalog_stub = stub :regions => ['us-east-1', 'us-west-1']
Heirloom::Catalog.stub(:new).and_return catalog_stub
@archive_mock = mock 'archive'
+ @logger_mock = mock_log
+ Heirloom::HeirloomLogger.stub :new => @logger_mock
Heirloom::Archive.stub(:new).and_return @archive_mock
end
it "should delegate to archive object" do
@@ -32,12 +34,9 @@
it "should log and do a SystemExit when a rotate fails" do
@archive_mock.stub(:rotate).and_raise Heirloom::Exceptions::RotateFailed.new("failed")
- @logger_mock = mock 'logger'
- Heirloom::HeirloomLogger.stub :new => @logger_mock
-
@logger_mock.should_receive(:error).with "failed"
expect {
Heirloom::CLI::Rotate.new.rotate
}.to raise_error SystemExit