2
0

Fix RSpec/AnyInstance cop (#27810)

This commit is contained in:
Matt Jankowski
2023-11-14 09:52:59 -05:00
committed by GitHub
parent d562fb8459
commit b2c5b20ef2
14 changed files with 70 additions and 60 deletions

View File

@@ -64,8 +64,11 @@ describe Request do
end
it 'closes underlying connection' do
expect_any_instance_of(HTTP::Client).to receive(:close)
allow(subject.send(:http_client)).to receive(:close)
expect { |block| subject.perform(&block) }.to yield_control
expect(subject.send(:http_client)).to have_received(:close)
end
it 'returns response which implements body_with_limit' do