Sha256: 76e1c971e33e579e604462057ee3a3857e30982b231b4e2085946f6a9c37412e

Contents?: true

Size: 407 Bytes

Versions: 4

Compression:

Stored size: 407 Bytes

Contents

require 'spec_helper'

describe Hari::Entity::Serialization::Time do

  describe '.serialize, .desserialize' do
    it 'converts value to string' do
      time = Time.new(2012, 04, 30, 12, 05, 50)
      subject.serialize(time).should == '20120430120550'
      subject.serialize('2012-04-30T12:05:50').should == '20120430120550'
      subject.desserialize('20120430120550').should == time
    end
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
hari-0.0.5 spec/hari/entity/serialization/time_spec.rb
hari-0.0.4 spec/hari/entity/serialization/time_spec.rb
hari-0.0.3 spec/hari/entity/serialization/time_spec.rb
hari-0.0.1 spec/hari/entity/serialization/time_spec.rb