Skip to content

Commit 0dff6a1

Browse files
committed
Adds test for connection_pool options.
1 parent f8420cd commit 0dff6a1

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

spec/support/shared_examples/request_method.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,5 +248,17 @@
248248
conn.public_send(http_method, '/')
249249
request_stub.disable
250250
end
251+
252+
it 'passes pool options to the connection pool' do
253+
adapter_options << { pool: { size: 3 }}
254+
pool = nil
255+
allow_any_instance_of(described_class).to receive(:pool).and_wrap_original do |m, *args|
256+
pool ||= m.call(*args)
257+
end
258+
259+
conn.public_send(http_method, '/')
260+
expect(pool.size).to eq(3)
261+
request_stub.disable
262+
end
251263
end
252264
end

0 commit comments

Comments
 (0)