Skip to content

Commit

Permalink
Adds test for connection_pool options.
Browse files Browse the repository at this point in the history
  • Loading branch information
iMacTia committed Jul 25, 2019
1 parent f8420cd commit abb301b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions spec/support/shared_examples/request_method.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit abb301b

Please sign in to comment.