Skip to content
Snippets Groups Projects
Commit f0b73bdf authored by Matthias Käppler's avatar Matthias Käppler :two:
Browse files

Fix BaseExporterSpec in Ruby 3

parent 67fcef19
No related branches found
No related tags found
1 merge request!96864Fix BaseExporterSpec in Ruby 3
......@@ -10,11 +10,12 @@
describe 'when exporter is enabled' do
before do
allow(::WEBrick::HTTPServer).to receive(:new).with(
Port: anything,
BindAddress: anything,
Logger: anything,
AccessLog: anything
).and_call_original
{
Port: anything,
BindAddress: anything,
Logger: anything,
AccessLog: anything
}).and_call_original
allow(settings).to receive(:enabled).and_return(true)
allow(settings).to receive(:port).and_return(0)
......@@ -45,11 +46,12 @@
it 'starts server with port and address from settings' do
expect(::WEBrick::HTTPServer).to receive(:new).with(
Port: port,
BindAddress: address,
Logger: anything,
AccessLog: anything
).and_wrap_original do |m, *args|
{
Port: port,
BindAddress: address,
Logger: anything,
AccessLog: anything
}).and_wrap_original do |m, *args|
m.call(DoNotListen: true, Logger: args.first[:Logger])
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment