Sha256: 2d9fa383ac54e392cd76e9108ae1d6abe0ed293870d5ac1339bf98d3f0097871

Contents?: true

Size: 514 Bytes

Versions: 1

Compression:

Stored size: 514 Bytes

Contents

require File.dirname(__FILE__) + '/test_helper'

describe Anisoptera::Serializer do
  before do
    @data = {:a => 'a', :b => 'b', :c => 11}
    @encoded = Anisoptera::Serializer.marshal_encode(@data)
  end

  describe "encoding" do
    it "must convert object into a string" do
      @encoded.class.should == String
    end
  end
  
  describe 'decoding' do
    it 'should recover original object' do
      decoded = Anisoptera::Serializer.marshal_decode(@encoded)
      decoded.should == @data
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
anisoptera-0.0.2 spec/serializer_spec.rb