summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-06-09 14:23:00 -0600
committermo khan <mo@mokhan.ca>2025-06-09 14:23:00 -0600
commit3ce95b474d2ee6c770a17a02318a6e01d9844b21 (patch)
tree585e42abaf8ed8dc4ced07f1cb0e5e939b9a8873
parent7f945dcdd07121f0443545eec8c671faabb83999 (diff)
test: extract config for http variable
-rw-r--r--spec/integration/server_spec.rb2
-rw-r--r--spec/support/server.rb3
2 files changed, 4 insertions, 1 deletions
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")