Sha256: fd454bdf20b0a52655f4083288d62004f704c51ea4c49b2e323d8a89258b8c92
Contents?: true
Size: 731 Bytes
Versions: 49
Compression:
Stored size: 731 Bytes
Contents
require File.expand_path('../../../../../spec_helper', __FILE__) require 'net/http' require "stringio" ruby_version_is ''...'1.9.3' do describe "Net::HTTPResponse#to_ary" do before(:each) do @res = Net::HTTPUnknownResponse.new("1.0", "???", "test response") socket = Net::BufferedIO.new(StringIO.new("test body")) @res.reading_body(socket, true) {} end it "returns an Array containing a duplicate of self and self's body" do ary = @res.to_ary ary.size.should == 2 ary[0].inspect.should == @res.inspect ary[1].should == "test body" end it "removes #to_ary from the duplicate of self" do @res.to_ary[0].respond_to?(:to_ary).should be_false end end end
Version data entries
49 entries across 49 versions & 2 rubygems