From c0b5e6e62f18de3672c3b7f49567e2dbace1a6de Mon Sep 17 00:00:00 2001 From: TAGOMORI Satoshi Date: Tue, 25 Oct 2016 11:47:53 +0900 Subject: [PATCH] fix to use fixed(correct) number for assertion --- test/plugin/test_parser_json.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/plugin/test_parser_json.rb b/test/plugin/test_parser_json.rb index d841cedb38..46c5f47d9f 100644 --- a/test/plugin/test_parser_json.rb +++ b/test/plugin/test_parser_json.rb @@ -77,8 +77,8 @@ def test_parse_float_time(data) parser.configure('json_parser' => data) text = "100.1" parser.instance.parse("{\"time\":\"#{text}\"}") do |time, record| - assert_equal Time.at(text.to_f).to_i, time.sec - assert_equal Time.at(text.to_f).nsec, time.nsec + assert_equal 100, time.sec + assert_equal 100_000_000, time.nsec end end