Sha256: 98f6c51e3643b05f898443280bc847a47452a2d1e462a0214478dbf77ba25994
Contents?: true
Size: 399 Bytes
Versions: 1
Compression:
Stored size: 399 Bytes
Contents
require 'spec_helper' describe Hari::Entity::Serialization::Hash do specify '.serialize' do subject.serialize(nil).should eq({}) subject.serialize('').should eq({}) subject.serialize(a: 1, b: 2).should eq(a: 1, b: 2) struct = OpenStruct.new(a: 1, b: 2) subject.serialize(struct).should eq(a: 1, b: 2) expect { subject.serialize('notahash') }.to raise_error end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
hari-0.0.5 | spec/hari/entity/serialization/hash_spec.rb |