Sha256: 9378326fe68f91e91174247d6c7a5b0247565cba175c877688136f478e47c3c6
Contents?: true
Size: 440 Bytes
Versions: 5
Compression:
Stored size: 440 Bytes
Contents
require 'json' require File.dirname(__FILE__) + '/spec_helper' describe URL do context "A json response" do subject { URL.new('https://graph.facebook.com/37901410') } it "should parse json" do subject.get.json.should be_a(Hash) end it "should cache the json generation" do JSON.should_receive(:parse).once.and_return({}) resp = subject.get resp.json resp.json end end end
Version data entries
5 entries across 5 versions & 2 rubygems