Skip to content

Commit e506037

Browse files
committed
Add extra spec (currently fails)
1 parent 41dce1f commit e506037

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

spec/examples/yearly_rule_spec.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,14 @@
7777
expect(schedule.occurrences(Time.utc(2010, 12, 31))).to eq days_of_year
7878
end
7979

80+
it 'should produce the correct days for @interval = 1 when you specify week days' do
81+
start_time = Time.utc(2010, 1, 1)
82+
schedule = IceCube::Schedule.new(start_time)
83+
schedule.add_recurrence_rule IceCube::Rule.yearly.day(:monday)
84+
85+
expect(schedule.occurrences(Time.utc(2010, 12, 31)).count).to eq 52
86+
end
87+
8088
it 'should produce the correct days for @interval = 1 when you specify negative days' do
8189
schedule = IceCube::Schedule.new(Time.utc(2010, 1, 1))
8290
schedule.add_recurrence_rule IceCube::Rule.yearly.day_of_year(100, -1)

0 commit comments

Comments
 (0)