Sha256: 7f78a06e541173dff7cf0688925685a8d00f9806f2aee7fe08dab8a633756fc7
Contents?: true
Size: 627 Bytes
Versions: 10
Compression:
Stored size: 627 Bytes
Contents
require "spec_helper" describe Qsagi::JsonSerializer do describe "self.deserialize" do it "parses json" do Qsagi::JsonSerializer.deserialize('{"a": "b"}').should == {"a" => "b"} end end describe "self.serialize" do it "parses json" do Qsagi::JsonSerializer.serialize({"a" => "b"}).should == '{"a":"b"}' end end it "serializes and deserializes correctly through a queue" do json_queue = Class.new(ExampleQueue) do serializer Qsagi::JsonSerializer end json_queue.connect do |queue| queue.push :a => 1 queue.pop.payload.should == {'a' => 1} end end end
Version data entries
10 entries across 10 versions & 1 rubygems