Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: fabe67e1c0
Fetching contributors…

Cannot retrieve contributors at this time

29 lines (22 sloc) 0.676 kB
require 'test_helper'
require 'forwardable'
class FactoryTest < Test::Unit::TestCase
extend Forwardable
def_delegator FaradayStack, :build
class CustomConnection < Faraday::Connection
end
def test_default_connection
assert_instance_of Faraday::Connection, FaradayStack.default_connection
end
def test_build_subclass
assert_instance_of CustomConnection, build(CustomConnection)
end
def test_build_url
conn = FaradayStack.build('http://example.com')
assert_equal 'example.com', conn.host
end
def test_build_url_in_options
conn = FaradayStack.build(:url => 'http://example.com')
assert_equal 'example.com', conn.host
end
end
Jump to Line
Something went wrong with that request. Please try again.