Skip to content

Commit 3dcf318

Browse files
committed
fixed specs to take milliseconds into account
1 parent c9f9dea commit 3dcf318

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ruby/hyper-model/spec/batch1/column_types/column_type_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def method_missing(m, *args, &b)
2727
end
2828

2929
def as_json
30-
strftime("%Y-%m-%dT%H:%M:%S%z").gsub(/\+0000$/, '-0000')
30+
strftime("%Y-%m-%dT%H:%M:%S.%3N%z").gsub(/\+0000$/, '-0000')
3131
end
3232

3333
attr_reader :time
@@ -251,7 +251,7 @@ class DefaultTest < ActiveRecord::Base
251251
test = TypeTest.new
252252
test.datetime = 12.2
253253
test.datetime + 60.9
254-
end.to eq((Timex.at(12.2)+60.9).as_json)
254+
end.to eq(Timex.at(73.1001).as_json) # extra 1 digit forces round up
255255
check_errors
256256
end
257257

0 commit comments

Comments
 (0)