Sha256: e8b70b0b231668865c257997b67ed7dee8d37c67d0aa76ab25d37813bc77aee7

Contents?: true

Size: 527 Bytes

Versions: 52

Compression:

Stored size: 527 Bytes

Contents

describe :net_httpresponse_body, :shared => true do
  before(:each) do
    @res = Net::HTTPUnknownResponse.new("1.0", "???", "test response")
    @socket = Net::BufferedIO.new(StringIO.new("test body"))
  end

  it "returns the read body" do
    @res.reading_body(@socket, true) do
      @res.send(@method).should == "test body"
    end
  end

  it "returns the previously read body if called a second time" do
    @res.reading_body(@socket, true) do
      @res.send(@method).should equal(@res.send(@method))
    end
  end
end

Version data entries

52 entries across 52 versions & 3 rubygems

Version Path
rhodes-7.6.0 spec/framework_spec/app/spec/library/net/http/httpresponse/shared/body.rb
rhodes-7.5.1 spec/framework_spec/app/spec/library/net/http/httpresponse/shared/body.rb
rhodes-7.4.1 spec/framework_spec/app/spec/library/net/http/httpresponse/shared/body.rb
rhodes-7.1.17 spec/framework_spec/app/spec/library/net/http/httpresponse/shared/body.rb
rhodes-6.2.0 spec/framework_spec/app/spec/library/net/http/httpresponse/shared/body.rb
rhodes-6.0.11 spec/framework_spec/app/spec/library/net/http/httpresponse/shared/body.rb
rhodes-5.5.18 spec/framework_spec/app/spec/library/net/http/httpresponse/shared/body.rb
rhodes-5.5.17 spec/framework_spec/app/spec/library/net/http/httpresponse/shared/body.rb
rhodes-5.5.15 spec/framework_spec/app/spec/library/net/http/httpresponse/shared/body.rb
rhodes-5.5.0.22 spec/framework_spec/app/spec/library/net/http/httpresponse/shared/body.rb
rhodes-5.5.2 spec/framework_spec/app/spec/library/net/http/httpresponse/shared/body.rb
rhodes-5.5.0.7 spec/framework_spec/app/spec/library/net/http/httpresponse/shared/body.rb
rhodes-5.5.0.3 spec/framework_spec/app/spec/library/net/http/httpresponse/shared/body.rb
rhodes-5.5.0 spec/framework_spec/app/spec/library/net/http/httpresponse/shared/body.rb
tauplatform-1.0.3 spec/framework_spec/app/spec/library/net/http/httpresponse/shared/body.rb
tauplatform-1.0.2 spec/framework_spec/app/spec/library/net/http/httpresponse/shared/body.rb
tauplatform-1.0.1 spec/framework_spec/app/spec/library/net/http/httpresponse/shared/body.rb
rubysl-net-http-1.0.1 spec/httpresponse/shared/body.rb
rubysl-net-http-2.0.4 spec/httpresponse/shared/body.rb
rubysl-net-http-1.0.0 spec/httpresponse/shared/body.rb