Sha256: c2c1c40b3313f731ef7f33a189e1369f4e807c39e37f700d719db607c9ddaa7d

Contents?: true

Size: 919 Bytes

Versions: 23

Compression:

Stored size: 919 Bytes

Contents

Shindo.tests('Excon bad server interaction') do

  with_server('bad') do

    tests('bad server: causes EOFError') do

      tests('with no content length and no chunking') do
        tests('without a block') do
          tests('response.body').returns('hello') do
            connection = Excon.new('http://127.0.0.1:9292')

            connection.request(:method => :get, :path => '/eof/no_content_length_and_no_chunking').body
          end
        end

        tests('with a block') do
          tests('body from chunks').returns('hello') do
            connection = Excon.new('http://127.0.0.1:9292')

            body = ""
            response_block = lambda {|chunk, remaining, total| body << chunk }

            connection.request(:method => :get, :path => '/eof/no_content_length_and_no_chunking', :response_block => response_block)

            body
          end
        end

      end

    end

  end

end

Version data entries

23 entries across 23 versions & 2 rubygems

Version Path
excon-0.16.4 tests/bad_tests.rb
excon-0.16.3 tests/bad_tests.rb
excon-0.16.2 tests/bad_tests.rb
excon-0.16.1 tests/bad_tests.rb
excon-0.16.0 tests/bad_tests.rb
excon-0.15.5 tests/bad_tests.rb
excon-0.15.4 tests/bad_tests.rb
excon-0.15.3 tests/bad_tests.rb
excon-0.15.2 tests/bad_tests.rb
excon-0.15.1 tests/bad_tests.rb
excon-0.15.0 tests/bad_tests.rb
excon-0.14.3 tests/bad_tests.rb
excon-0.14.2 tests/bad_tests.rb
excon-0.14.1 tests/bad_tests.rb
excon-0.14.0 tests/bad_tests.rb
ftl-0.2.0 vendor/bundle/gems/excon-0.13.4/tests/bad_tests.rb
excon-0.13.4 tests/bad_tests.rb
excon-0.13.3 tests/bad_tests.rb
excon-0.13.2 tests/bad_tests.rb
excon-0.13.1 tests/bad_tests.rb