Sha256: 25b472b9eb36ab94db9e95864c83f7b412da7c2e255cd960e08f5419f74e0250
Contents?: true
Size: 1.17 KB
Versions: 2
Compression:
Stored size: 1.17 KB
Contents
require "spec_helper" require "blinkenstein" module Blinkenstein describe EveSkillQueueMonitor do let(:monitor) { EveSkillQueueMonitor.new } describe "refresh" do it "goes into error mode if queue left is < 0" do monitor.stub(:hours_left).and_return(-1) monitor.should_receive(:failure) monitor.refresh end it "is cool if the skill queue is longer than 24h" do monitor.stub(:hours_left).and_return(25) monitor.should_receive(:cool) monitor.refresh end it "is nervous if the skill queue is between 9h and 24h long" do monitor.stub(:hours_left).and_return(9) monitor.should_receive(:nervous) monitor.refresh end it "is panicing if the skill queue is below 8h long" do monitor.stub(:hours_left).and_return(0) monitor.should_receive(:panic) monitor.refresh end end describe ".hours_left" do it "is showing a failure if something is wrong while calling the API" do Eve::SkillQueue.any_instance.stub(:refresh).and_raise(RuntimeError) monitor.should_receive(:failure) monitor.refresh end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
blinkenstein-0.2.4 | spec/blinkenstein/monitors/eve_skill_queue_monitor_spec.rb |
blinkenstein-0.2.3 | spec/blinkenstein/monitors/eve_skill_queue_monitor_spec.rb |