File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -98,23 +98,20 @@ module IceCube
98
98
}
99
99
100
100
it "should not skip a month when DST ends" do
101
- schedule . first ( 48 ) . inject ( nil ) do |last_date , current_date |
102
- next current_date unless last_date
103
- expect ( month_interval ( current_date , last_date ) ) . to eq ( 1 )
101
+ schedule . first ( 48 ) . each_cons ( 2 ) do |t0 , t1 |
102
+ expect ( month_interval ( t1 , t0 ) ) . to eq ( 1 )
104
103
end
105
104
end
106
105
107
106
it "should not change day when DST ends" do
108
- schedule . first ( 48 ) . inject ( nil ) do |last_date , current_date |
109
- next current_date unless last_date
110
- expect ( current_date . wday ) . to eq ( wday )
107
+ schedule . first ( 48 ) . each do |date |
108
+ expect ( date . wday ) . to eq ( wday )
111
109
end
112
110
end
113
111
114
112
it "should not change hour when DST ends" do
115
- schedule . first ( 48 ) . inject ( nil ) do |last_date , current_date |
116
- next current_date unless last_date
117
- expect ( current_date . hour ) . to eq ( 0 )
113
+ schedule . first ( 48 ) . each do |time |
114
+ expect ( time . hour ) . to eq ( 0 )
118
115
end
119
116
end
120
117
end
You can’t perform that action at this time.
0 commit comments