diff --git a/ruby/tests/well_known_types_test.rb b/ruby/tests/well_known_types_test.rb index 5fcc3dbabe..996dbc30a5 100755 --- a/ruby/tests/well_known_types_test.rb +++ b/ruby/tests/well_known_types_test.rb @@ -33,13 +33,13 @@ class TestWellKnownTypes < Test::Unit::TestCase time = Time.at(123456, Rational(654321321, 1000)) ts = Google::Protobuf::Timestamp.from_time(time) assert_equal 123456, ts.seconds - assert_equal 654321000, ts.nanos + assert_equal 654321321, ts.nanos assert_equal time, ts.to_time # Instance method returns the same value as class method assert_equal Google::Protobuf::Timestamp.new.from_time(time), Google::Protobuf::Timestamp.from_time(time) -end + end def test_duration duration = Google::Protobuf::Duration.new(seconds: 123, nanos: 456)