~arestifo/crystal-cbor

9582e9feffed31fc8c27f5897597145014fe410d — Alberto Restifo 1 year, 1 month ago e46b8fa master
Fix formatting
1 files changed, 4 insertions(+), 5 deletions(-)

M spec/cbor_spec.cr
M spec/cbor_spec.cr => spec/cbor_spec.cr +4 -5
@@ 16,8 16,8 @@ end
class House
  include CBOR::Serializable

  property address   : String
  property location  : Location?
  property address : String
  property location : Location?

  def initialize(@address)
  end


@@ 28,11 28,11 @@ class Person
  include CBOR::Serializable::Unmapped

  property name : String?

  def initialize(@name = nil)
  end
end


describe CBOR do
  describe "basics: to_cbor" do
    it "empty array" do


@@ 98,7 98,7 @@ describe CBOR do
    it "Person#from_cbor with unmapped values" do
      h = Hash(String | Int32, String | Int32).new
      h["name"] = "Alice"
      h["age"]  = 30
      h["age"] = 30
      h["size"] = 160
      alice = Person.from_cbor h.to_cbor
      alice.to_cbor.hexstring.should eq "a3646e616d6565416c69636563616765181e6473697a6518a0"


@@ 112,4 112,3 @@ describe CBOR do
    end
  end
end