1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00

Update Server test

This commit is contained in:
Thomas Walpole 2021-01-20 14:58:55 -08:00
parent 6440e5c76c
commit a08e0477ac

View file

@ -108,8 +108,12 @@ RSpec.describe Capybara::Server do
expect(options.fetch(:environment)).to be_a(String)
method.call(app, events, options)
end
described_class.new(app_proc).boot
expect(Puma::Server).to have_received(:new)
server = described_class.new(app_proc).boot
expect(Puma::Server).to have_received(:new).with(
anything,
anything,
satisfy { |opts| opts.final_options[:Port] == server.port }
)
ensure
Capybara.server = :default
end