spec/heroku/scalr/app_spec.rb in heroku-scalr-0.2.0 vs spec/heroku/scalr/app_spec.rb in heroku-scalr-0.2.1

- old
+ new

@@ -51,9 +51,15 @@ it "should skip if scaled too recently" do subject.instance_variable_set :@last_scaled_at, Time.now subject.scale!.should be_nil end + it "should log errors" do + subject.api.should_receive(:get_app).and_raise(RuntimeError, "API Error") + Heroku::Scalr.logger.should_receive(:error) + subject.scale!.should be_nil + end + it "should determine scale through metric" do subject.metric.should_receive(:by).and_return(-1) subject.scale!.should == 1 end \ No newline at end of file