test/test_helper.rb in stripe-3.31.1 vs test/test_helper.rb in stripe-4.0.0
- old
+ new
@@ -25,10 +25,11 @@
# Try one initial test connection to stripe-mock so that if there's a problem
# we can print one error and fail fast so that it's more clear to the user how
# they should fix the problem.
begin
- resp = Faraday.get("http://localhost:#{MOCK_PORT}/")
+ conn = Faraday::Connection.new("http://localhost:#{MOCK_PORT}")
+ resp = conn.get("/")
version = resp.headers["Stripe-Mock-Version"]
if version != "master" &&
Gem::Version.new(version) < Gem::Version.new(MOCK_MINIMUM_VERSION)
abort("Your version of stripe-mock (#{version}) is too old. The minimum " \
"version to run this test suite is #{MOCK_MINIMUM_VERSION}. Please " \