@@ -102,7 +102,7 @@ module IceCube
102
102
RRULE:FREQ=WEEKLY;BYDAY=TH;UNTIL=20130531T100000Z
103
103
ICAL
104
104
105
- ical_string_woth_multiple_exdates = <<-ICAL . gsub ( /^\s */ , '' )
105
+ ical_string_with_multiple_exdates = <<-ICAL . gsub ( /^\s */ , '' )
106
106
DTSTART;TZID=America/Denver:20130731T143000
107
107
DTEND;TZID=America/Denver:20130731T153000
108
108
RRULE:FREQ=WEEKLY;UNTIL=20140730T203000Z;BYDAY=MO,WE,FR
@@ -111,6 +111,11 @@ module IceCube
111
111
EXDATE;TZID=America/Denver:20130807T143000
112
112
ICAL
113
113
114
+ ical_string_with_multiple_rules = <<-ICAL . gsub ( /^\s */ , '' )
115
+ DTSTART;TZID=CDT:20151005T195541
116
+ RRULE:FREQ=WEEKLY;BYDAY=MO,TU
117
+ RRULE:FREQ=WEEKLY;INTERVAL=2;WKST=SU;BYDAY=FR
118
+ ICAL
114
119
115
120
def sorted_ical ( ical )
116
121
ical . split ( /\n / ) . sort . map { |field |
@@ -359,10 +364,17 @@ def sorted_ical(ical)
359
364
end
360
365
361
366
it 'handles multiple EXDATE lines' do
362
- schedule = IceCube ::Schedule . from_ical ical_string_woth_multiple_exdates
367
+ schedule = IceCube ::Schedule . from_ical ical_string_with_multiple_exdates
363
368
schedule . exception_times . count . should == 3
364
369
end
365
370
end
371
+
372
+ describe 'multiple rules' do
373
+ it 'handles multiple recurrence rules' do
374
+ schedule = IceCube ::Schedule . from_ical ical_string_with_multiple_rules
375
+ schedule . recurrence_rules . count . should == 2
376
+ end
377
+ end
366
378
end
367
379
368
380
end
0 commit comments