Sha256: b233efaf49f3c6fedc125c8b507cbaf11be601bdbd452095b1b9b3a97399db78

Contents?: true

Size: 516 Bytes

Versions: 1

Compression:

Stored size: 516 Bytes

Contents

require "spec_helper_lite"
require "undo/serializer/simple"

describe Undo::Serializer::Simple do
  subject { described_class }
  let(:serializer) { described_class.new }

  it "serializes to json" do
    object = { "hello" => "world" }
    result = serializer.to_json object
    expect(result).to eq '{"hello":"world"}'
  end

  it "deserializes from json" do
    serialized_object = '{"hello":"world"}'
    result = serializer.load_from_json serialized_object
    expect(result).to eq "hello" => "world"
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
undo-0.0.1 spec/undo/serializer/simple_spec.rb