require "spec_helper" require "blinkenstein/monitors/eve_skill_queue_monitor" 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(:error) 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 end end