Sha256: bd4fe2a95dceba1face0c03cb0608de7375735b2d9e1a395b80e3cf6a10f6542
Contents?: true
Size: 613 Bytes
Versions: 8
Compression:
Stored size: 613 Bytes
Contents
# # Specifying rufus-scheduler # # Wed Apr 17 06:00:59 JST 2013 # require 'spec_helper' describe Rufus::Scheduler::JobArray do class DummyJob < Struct.new(:id, :next_time); end before(:each) do @array = Rufus::Scheduler::JobArray.new end describe '#push' do it 'pushes jobs' do @array.push(DummyJob.new('a', Time.local(0))) @array.to_a.collect(&:id).should == %w[ a ] end it 'pushes and remove duplicates' do j = DummyJob.new('a', Time.local(0)) @array.push(j) @array.push(j) @array.to_a.collect(&:id).should == %w[ a ] end end end
Version data entries
8 entries across 8 versions & 1 rubygems