test/test_RepeaterDayName.rb in jdl-chronic-0.3.0.1 vs test/test_RepeaterDayName.rb in jdl-chronic-0.3.0.2

- old
+ new

@@ -47,6 +47,23 @@ assert_equal Time.local(2006, 8, 7), span.begin assert_equal Time.local(2006, 8, 8), span.end end + def test_next_past_across_dst_boundary + @now = Time.local(2009, 3, 10, 0, 0, 0, 0) + wednesdays = Chronic::RepeaterDayName.new(:wednesday) + wednesdays.start = @now + + span = wednesdays.next(:past) + + assert_equal Time.local(2009, 3, 4), span.begin + assert_equal Time.local(2009, 3, 5), span.end + + span = wednesdays.next(:past) + + assert_equal Time.local(2009, 2, 25), span.begin + assert_equal Time.local(2009, 2, 26), span.end + end + + end \ No newline at end of file