spec/karousel_spec.rb in karousel-0.9.13 vs spec/karousel_spec.rb in karousel-0.9.14

- old
+ new

@@ -6,10 +6,14 @@ end before(:each) do ClientJobDummy.reset end + + it 'should have version' do + Karousel.version.should =~ /^[\d]+\.[\d]+\.[\d]+$/ + end it "should initiate" do k = Karousel.new(ClientJobDummy, 20, 0) k.class.should == Karousel end @@ -20,16 +24,26 @@ @karousel.time_interval.should == 0 end it "should run with block" do karousel = Karousel.new(ClientJobDummy, 20, 0) + count = 0 + karousel.run do + count += 1 + if count < 10 + karousel.seats[1].class.should == Karousel::Job + karousel.seats[1].client_job.class.should == ClientJobDummy + end + end end it "should be able to get loaded with jobs" do @karousel.seats.size.should == 0 @karousel.populate @karousel.seats.size.should == 20 @karousel.seats[0].class == Karousel::Job @karousel.seats[0].status.should == Karousel::STATUS[:init] end + + end