From 3ce95b474d2ee6c770a17a02318a6e01d9844b21 Mon Sep 17 00:00:00 2001 From: mo khan Date: Mon, 9 Jun 2025 14:23:00 -0600 Subject: test: extract config for http variable --- spec/integration/server_spec.rb | 2 +- spec/support/server.rb | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/spec/integration/server_spec.rb b/spec/integration/server_spec.rb index 1271f05..93d2bfd 100644 --- a/spec/integration/server_spec.rb +++ b/spec/integration/server_spec.rb @@ -4,7 +4,7 @@ require 'spec_helper' RSpec.describe "Server" do let(:base_url) { "http://#{RSpec.configuration.bind_addr}" } - let(:client) { Net::Hippie::Client.new } + let(:client) { RSpec.configuration.http } describe "GET /" do it 'returns OK' do diff --git a/spec/support/server.rb b/spec/support/server.rb index 2fea6af..51d4ed8 100644 --- a/spec/support/server.rb +++ b/spec/support/server.rb @@ -1,6 +1,9 @@ # frozen_string_literal: true RSpec.configure do |config| + config.add_setting :http + config.http = Net::Hippie::Client.new + config.add_setting :bind_addr config.bind_addr = ENV.fetch("BIND_ADDR", "127.0.0.1:7878") -- cgit v1.2.3