Sha256: a8abf5d328d3f411b2fd473ba929afc4b0a569c633f2db356fe76145f2106004

Contents?: true

Size: 883 Bytes

Versions: 16

Compression:

Stored size: 883 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 = ""
            block = lambda {|chunk, remaining, total| body << chunk }

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

            body
          end
        end

      end

    end

  end

end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
excon-0.10.1 tests/bad_tests.rb
excon-0.10.0 tests/bad_tests.rb
excon-0.9.6 tests/bad_tests.rb
excon-0.9.5 tests/bad_tests.rb
excon-0.9.4 tests/bad_tests.rb
excon-0.9.3 tests/bad_tests.rb
excon-0.9.2 tests/bad_tests.rb
excon-0.9.1 tests/bad_tests.rb
excon-0.9.0 tests/bad_tests.rb
excon-0.8.0 tests/bad_tests.rb
excon-0.7.12 tests/bad_tests.rb
excon-0.7.11 tests/bad_tests.rb
excon-0.7.10 tests/bad_tests.rb
excon-0.7.9 tests/bad_tests.rb
excon-0.7.8 tests/bad_tests.rb
excon-0.7.7 tests/bad_tests.rb