Sha256: 3e851a11a5b3c6ddfe2cf712ad4b45fae47759542b09a1a094afbcbeb4fc4671
Contents?: true
Size: 638 Bytes
Versions: 1
Compression:
Stored size: 638 Bytes
Contents
require "spec_helper" describe Qsagi::JsonSerializer do describe "self.deserialize" do it "parses json" do expect(Qsagi::JsonSerializer.deserialize('{"a": "b"}')).to eq("a" => "b") end end describe "self.serialize" do it "parses json" do expect(Qsagi::JsonSerializer.serialize({"a" => "b"})).to eq('{"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 expect(queue.pop.payload).to eq('a' => 1) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
qsagi-0.2.3 | spec/qsagi/json_serializer_spec.rb |