Sha256: cd4edc799dac4bcc97c4bd336026fd6a76bef5db48e5fb8a86dbd4f7e5d39ea8
Contents?: true
Size: 597 Bytes
Versions: 16
Compression:
Stored size: 597 Bytes
Contents
require File.expand_path(File.join(File.dirname(__FILE__), '../../', 'spec_helper')) module Hoth module Encoding describe Json do it "should decode a JSON string" do decoded_json = Json.decode '{"test":23}' decoded_json.should ==({"test" => 23}) end it "should encode a JSON string" do encoded_json = Json.encode({"test" => 23}) '{"test":23}'.should == encoded_json end it "should know its ContentType" do Json.content_type.should == "application/json" end end end end
Version data entries
16 entries across 16 versions & 2 rubygems