|
13 | 13 | dates.each do |date|
|
14 | 14 | date.utc?.should_not == true
|
15 | 15 | date.hour.should == 5
|
16 |
| - end |
| 16 | + end |
17 | 17 | end
|
18 | 18 |
|
19 | 19 | # DST in 2010 is November 7th at 2am
|
|
27 | 27 | dates.each do |date|
|
28 | 28 | date.utc?.should_not == true
|
29 | 29 | date.hour.should == 5
|
30 |
| - end |
| 30 | + end |
31 | 31 | end
|
32 |
| - |
| 32 | + |
33 | 33 | it 'cross a daylight savings time boundary with a recurrence rule in local time' do
|
34 | 34 | start_date = Time.local(2010, 3, 14, 5, 0, 0)
|
35 | 35 | schedule = IceCube::Schedule.new(start_date)
|
|
55 | 55 | distance_in_hours += 2
|
56 | 56 | end
|
57 | 57 | end
|
58 |
| - |
| 58 | + |
59 | 59 | it 'every 30 minutes over a daylight savings time boundary, checking interval' do
|
60 | 60 | start_date = Time.local(2010, 11, 6, 23, 0, 0)
|
61 | 61 | schedule = IceCube::Schedule.new(start_date)
|
|
68 | 68 | distance_in_minutes += 30
|
69 | 69 | end
|
70 | 70 | end
|
71 |
| - |
| 71 | + |
72 | 72 | it 'every 120 seconds over a daylight savings time boundary, checking interval' do
|
73 | 73 | start_date = Time.local(2010, 11, 6, 23, 50, 0)
|
74 | 74 | schedule = IceCube::Schedule.new(start_date)
|
|
81 | 81 | distance_in_seconds += 120
|
82 | 82 | end
|
83 | 83 | end
|
84 |
| - |
| 84 | + |
85 | 85 | it 'every other day over a daylight savings time boundary, checking hour/min/sec' do
|
86 | 86 | start_date = Time.local(2010, 11, 6, 20, 0, 0)
|
87 | 87 | schedule = IceCube::Schedule.new(start_date)
|
|
94 | 94 | d.sec.should == start_date.sec
|
95 | 95 | end
|
96 | 96 | end
|
97 |
| - |
| 97 | + |
98 | 98 | it 'every other month over a daylight savings time boundary, checking day/hour/min/sec' do
|
99 | 99 | start_date = Time.local(2010, 11, 6, 20, 0, 0)
|
100 | 100 | schedule = IceCube::Schedule.new(start_date)
|
|
108 | 108 | d.sec.should == start_date.sec
|
109 | 109 | end
|
110 | 110 | end
|
111 |
| - |
| 111 | + |
112 | 112 | it 'every other year over a daylight savings time boundary, checking day/hour/min/sec' do
|
113 | 113 | start_date = Time.local(2010, 11, 6, 20, 0, 0)
|
114 | 114 | schedule = IceCube::Schedule.new(start_date)
|
|
123 | 123 | d.sec.should == start_date.sec
|
124 | 124 | end
|
125 | 125 | end
|
126 |
| - |
| 126 | + |
127 | 127 | it 'LOCAL - has an until date on a rule that is over a DST from the start date' do
|
128 | 128 | start_date = Time.local(2010, 3, 13, 5, 0, 0)
|
129 | 129 | end_date = Time.local(2010, 3, 15, 5, 0, 0)
|
|
159 | 159 | #make sure we end on the proper time
|
160 | 160 | schedule.all_occurrences.last.should == end_date
|
161 | 161 | end
|
162 |
| - |
| 162 | + |
163 | 163 | it 'LOCAL - has an end date on a rule that is over a DST from the start date' do
|
164 | 164 | start_date = Time.local(2010, 3, 13, 5, 0, 0)
|
165 | 165 | end_date = Time.local(2010, 3, 15, 5, 0, 0)
|
|
262 | 262 | schedule.add_recurrence_rule IceCube::Rule.yearly.month_of_year(:april).day_of_month(10)
|
263 | 263 | schedule.first(3).should == [Time.local(2010, 4, 10, 12, 0, 0), Time.local(2011, 4, 10, 12, 0, 0), Time.local(2012, 4, 10, 12, 0, 0)]
|
264 | 264 | end
|
265 |
| - |
| 265 | + |
266 | 266 | end
|
0 commit comments