Sha256: 43f833a9dc9aa50d307c5fe5fc515a4dd8b1267c94f34f95734f9feb981f0c95
Contents?: true
Size: 387 Bytes
Versions: 8
Compression:
Stored size: 387 Bytes
Contents
RSpec.describe Redd::Response::ParseJson do it "parses valid JSON" do parsed = subject.parse('{"hello": "world", "foo": {"bar": 2}}') expect(parsed).to eq(hello: "world", foo: {bar: 2}) end it "returns the JSON string if it's invalid" do error = "comparision with banana failed." parsed = subject.parse(error) expect(parsed).to eq(error) end end
Version data entries
8 entries across 8 versions & 1 rubygems