Sha256: 7d7958e20287545cd174b1e35c4ef0248401279b97e9c5500dade27cf991743e

Contents?: true

Size: 340 Bytes

Versions: 5

Compression:

Stored size: 340 Bytes

Contents

require 'spec_helper'
require 'thrift/types/known/timestamp'

describe 'Thrift::Types::Known::Timestamp' do
  context 'from_time' do
    it do
      t = Time.at(137, 5, :nsec)

      tt = Thrift::Types::Known::Timestamp.from_time(t)

      tt.seconds.should == 137
      tt.nanos.should == 5

      tt.to_time.should == t
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
upfluence-thrift-2.6.8 spec/types/known/timestamp_spec.rb
upfluence-thrift-2.6.1 spec/types/known/timestamp_spec.rb
upfluence-thrift-2.4.4 spec/types/known/timestamp_spec.rb
upfluence-thrift-2.3.1 spec/types/known/timestamp_spec.rb
upfluence-thrift-2.3.0 spec/types/known/timestamp_spec.rb