Sha256: e99d19cda140dd08cb4420056e5a1cab23d12b745bf321de6bc3d9965cb50e03
Contents?: true
Size: 489 Bytes
Versions: 16
Compression:
Stored size: 489 Bytes
Contents
require 'spec_helper' describe Gush::JSON do subject { described_class } describe ".encode" do it "encodes data to JSON" do expect(subject.encode({a: 123})).to eq("{\"a\":123}") end end describe ".decode" do it "decodes JSON to data" do expect(subject.decode("{\"a\":123}")).to eq({"a" => 123}) end it "passes options to the internal parser" do expect(subject.decode("{\"a\":123}", symbolize_keys: true)).to eq({a: 123}) end end end
Version data entries
16 entries across 16 versions & 2 rubygems