Class: Adapters::RackTest

Inherits:
Faraday::TestCase show all
Includes:
Integration::Common, Integration::NonParallel
Defined in:
test/adapters/rack_test.rb

Instance Method Summary collapse

Methods included from Integration::NonParallel

#test_no_parallel_support

Methods included from Integration::Common

#create_connection, #test_DELETE_retrieves_the_body, #test_DELETE_retrieves_the_response_headers, #test_GET_handles_headers_with_multiple_values, #test_GET_retrieves_the_response_body, #test_GET_retrieves_the_response_headers, #test_GET_send_url_encoded_params, #test_GET_sends_user_agent, #test_GET_ssl, #test_GET_with_body, #test_HEAD_retrieves_no_response_body, #test_HEAD_retrieves_the_response_headers, #test_OPTIONS, #test_PATCH_send_url_encoded_params, #test_POST_retrieves_the_response_headers, #test_POST_send_url_encoded_nested_params, #test_POST_send_url_encoded_params, #test_POST_sends_files, #test_PUT_retrieves_the_response_headers, #test_PUT_send_url_encoded_nested_params, #test_PUT_send_url_encoded_params, #test_connection_error, #test_empty_body_response_represented_as_blank_string, #test_proxy, #test_proxy_auth_fail

Methods inherited from Faraday::TestCase

#capture_warnings, jruby?, rbx?, ssl_mode?, #test_default

Methods included from Faraday::LiveServerConfig

#live_server, #live_server=, #live_server?

Instance Method Details

#adapterObject


7
# File 'test/adapters/rack_test.rb', line 7

def adapter() :rack end

#adapter_optionsObject


9
10
11
# File 'test/adapters/rack_test.rb', line 9

def adapter_options
  [Faraday::LiveServer]
end

#test_timeoutObject

not using shared test because error is swallowed by Sinatra


18
19
20
21
22
23
24
# File 'test/adapters/rack_test.rb', line 18

def test_timeout
  conn = create_connection(:request => {:timeout => 1, :open_timeout => 1})
  begin
    conn.get '/slow'
  rescue Faraday::Error::ClientError
  end
end