spec/process/scheduler_spec.rb in eye-0.2.3 vs spec/process/scheduler_spec.rb in eye-0.2.4

- old
+ new

@@ -152,17 +152,27 @@ sleep 0.1 @process.last_scheduled_command.should == :scheduler_test3 @process.last_scheduled_reason.should == 'reason' @process.test3.should == [1, :bla, 3] end + + it "save history" do + @process.schedule :scheduler_test3, 1, :bla, 3, "reason" + sleep 0.1 + h = @process.schedule_history + h.size.should == 1 + h = h[0] + h[:state].should == :scheduler_test3 + h[:reason].should == "reason" + end end describe "schedule_in" do it "should schedule to future" do @process.schedule_in(1.second, :scheduler_test3, 1, 2, 3) sleep 0.5 @process.test3.should == nil - sleep 0.6 + sleep 0.7 @process.test3.should == [1,2,3] end end end \ No newline at end of file