Skip to content

Commit 04a07e0

Browse files
committed
Add version guard for spec failing on 3.2.2
1 parent e80f0c1 commit 04a07e0

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

core/time/new_spec.rb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -556,10 +556,14 @@ def obj.to_int; 3; end
556556
-> {
557557
Time.new("2020-12-25 00 +09:00")
558558
}.should raise_error(ArgumentError, /missing min part: 00 |can't parse:/)
559+
end
559560

560-
-> {
561-
Time.new("2020-12-25")
562-
}.should raise_error(ArgumentError, /no time information|can't parse:/)
561+
ruby_version_is "3.2.3" do
562+
it "raises ArgumentError if the time part is missing" do
563+
-> {
564+
Time.new("2020-12-25")
565+
}.should raise_error(ArgumentError, /no time information|can't parse:/)
566+
end
563567
end
564568

565569
it "raises ArgumentError if subsecond is missing after dot" do

0 commit comments

Comments
 (0)