spec/qsagi/json_serializer_spec.rb in qsagi-0.2.2 vs spec/qsagi/json_serializer_spec.rb in qsagi-0.2.3
- old
+ new
@@ -1,25 +1,25 @@
require "spec_helper"
describe Qsagi::JsonSerializer do
describe "self.deserialize" do
it "parses json" do
- Qsagi::JsonSerializer.deserialize('{"a": "b"}').should == {"a" => "b"}
+ expect(Qsagi::JsonSerializer.deserialize('{"a": "b"}')).to eq("a" => "b")
end
end
describe "self.serialize" do
it "parses json" do
- Qsagi::JsonSerializer.serialize({"a" => "b"}).should == '{"a":"b"}'
+ 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
- queue.pop.payload.should == {'a' => 1}
+ expect(queue.pop.payload).to eq('a' => 1)
end
end
end