Permalink
Browse files

Added Regression spec [#109]

  • Loading branch information...
1 parent 2a32fb8 commit 54280344d4af711f1c62b1511bfe3edb54b88733 @seejohnrun committed Oct 19, 2012
Showing with 9 additions and 0 deletions.
  1. +9 −0 spec/examples/regression_spec.rb
@@ -189,4 +189,13 @@
}.should_not raise_error(ArgumentError, 'comparison of Time with nil failed')
end
+ it 'should not infinite loop [#109]' do
+ schedule = IceCube::Schedule.new Time.new(2012, 4, 27, 0, 0, 0)
+ schedule.rrule IceCube::Rule.weekly.day(:monday, :tuesday, :wednesday, :thursday, :friday, :saturday, :sunday).hour_of_day(0).minute_of_hour(0).second_of_minute(0)
+ schedule.duration = 3600
+ start_time = Time.new(2012, 10, 20, 0, 0, 0)
+ end_time = Time.new(2012, 10, 20, 23, 59, 59)
+ schedule.occurrences_between(start_time, end_time).first.should == start_time
+ end
+
end

0 comments on commit 5428034

Please sign in to comment.