From 0dff6a1f8516c8d792169e1585aeb6593b606384 Mon Sep 17 00:00:00 2001 From: iMacTia Date: Thu, 25 Jul 2019 09:22:07 +0100 Subject: [PATCH] Adds test for connection_pool options. --- spec/support/shared_examples/request_method.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/spec/support/shared_examples/request_method.rb b/spec/support/shared_examples/request_method.rb index b1fcfcba4..44722ac5e 100644 --- a/spec/support/shared_examples/request_method.rb +++ b/spec/support/shared_examples/request_method.rb @@ -248,5 +248,17 @@ conn.public_send(http_method, '/') request_stub.disable end + + it 'passes pool options to the connection pool' do + adapter_options << { pool: { size: 3 }} + pool = nil + allow_any_instance_of(described_class).to receive(:pool).and_wrap_original do |m, *args| + pool ||= m.call(*args) + end + + conn.public_send(http_method, '/') + expect(pool.size).to eq(3) + request_stub.disable + end end end