There was an error while loading. Please reload this page.
1 parent 7524d7c commit 569565dCopy full SHA for 569565d
1 file changed
test/date/test_date_new.rb
@@ -199,11 +199,17 @@ def test_civil__offset
199
assert_equal(-1.to_r, d.offset)
200
201
# An out-of-range offset is ignored, as it is for the equivalent Integer.
202
- d = DateTime.civil(2001,2,3, 0,0,0, 2)
+ assert_warning(/invalid offset/) do
203
+ d = DateTime.civil(2001,2,3, 0,0,0, 2)
204
+ end
205
assert_equal(0, d.offset)
- d = DateTime.civil(2001,2,3, 0,0,0, Rational(2, 1))
206
207
+ d = DateTime.civil(2001,2,3, 0,0,0, Rational(2, 1))
208
209
- d = DateTime.civil(2001,2,3, 0,0,0, Rational(49710, 1))
210
211
+ d = DateTime.civil(2001,2,3, 0,0,0, Rational(49710, 1))
212
213
214
end
215
0 commit comments