Sha256: ea6ff3b77fa283fcdf6f76ca74dc12bcc5d2b75a38de8f3acd7ec73b0298ca7e

Contents?: true

Size: 992 Bytes

Versions: 58

Compression:

Stored size: 992 Bytes

Contents

Shindo.tests('Excon request methods') do

  with_rackup('request_methods.ru') do

    tests 'one-offs' do

      tests('Excon.get').returns('GET') do
        Excon.get('http://localhost:9292').body
      end

      tests('Excon.post').returns('POST') do
        Excon.post('http://localhost:9292').body
      end

      tests('Excon.delete').returns('DELETE') do
        Excon.delete('http://localhost:9292').body
      end

    end

    tests 'with a connection object' do
      connection = nil

      tests('connection.get').returns('GET') do
        connection = Excon.new('http://localhost:9292')
        connection.get.body
      end

      tests('connection.post').returns('POST') do
        connection.post.body
      end

      tests('connection.delete').returns('DELETE') do
        connection.delete.body
      end

      tests('not modifies path argument').returns('path') do
        path = 'path'
        connection.get(:path => path)
        path
      end

    end

  end

end

Version data entries

58 entries across 56 versions & 4 rubygems

Version Path
excon-0.64.0 tests/request_method_tests.rb
excon-0.63.0 tests/request_method_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/excon-0.62.0/tests/request_method_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/excon-0.62.0/tests/request_method_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/excon-0.62.0/tests/request_method_tests.rb
excon-0.62.0 tests/request_method_tests.rb
excon-0.61.0 tests/request_method_tests.rb
excon-0.60.0 tests/request_method_tests.rb
excon-0.59.0 tests/request_method_tests.rb
excon-0.58.0 tests/request_method_tests.rb
excon-0.57.1 tests/request_method_tests.rb
excon-0.57.0 tests/request_method_tests.rb
excon-0.56.0 tests/request_method_tests.rb
excon-0.55.0 tests/request_method_tests.rb
excon-0.54.0 tests/request_method_tests.rb
excon-0.53.0 tests/request_method_tests.rb
excon-0.52.0 tests/request_method_tests.rb
excon-0.51.0 tests/request_method_tests.rb
excon-0.50.1 tests/request_method_tests.rb
excon-0.50.0 tests/request_method_tests.rb