Sha256: 2c7f22316832e19e6de9f59244fad7fe0a4768cca1547f35031c8b4a40a262b2
Contents?: true
Size: 768 Bytes
Versions: 3
Compression:
Stored size: 768 Bytes
Contents
require 'net/http' describe "Net::HTTPGenericRequest#body_exist?" do it "returns true when the response is expected to have a body" do request = Net::HTTPGenericRequest.new("POST", true, true, "/some/path") request.body_exist?.should be_true request = Net::HTTPGenericRequest.new("POST", true, false, "/some/path") request.body_exist?.should be_false end # TODO: Doesn't work?! # # describe "when $VERBOSE is true" do # it "emits a warning" do # old_verbose, $VERBOSE = $VERBOSE, true # # begin # request = Net::HTTPGenericRequest.new("POST", true, false, "/some/path") # lambda { request.body_exist? }.should complain("") # ensure # $VERBOSE = old_verbose # end # end # end end
Version data entries
3 entries across 3 versions & 1 rubygems