Sha256: a34a1cc986b0f5b3c9f4faba95eb829e4835982e0cb7aeb242fb199d83670a8e
Contents?: true
Size: 288 Bytes
Versions: 26
Compression:
Stored size: 288 Bytes
Contents
describe "Hash#to_json" do it "returns a string of all key and value pairs" do {}.to_json.should == "{}" {"a" => 1, "b" => 2}.to_json.should == '{"a": 1, "b": 2}' hash = {"a" => 1, "b" => false, "c" => nil, "d" => true} JSON.parse(hash.to_json).should == hash end end
Version data entries
26 entries across 26 versions & 1 rubygems