Skip to content

Commit 2a96ffb

Browse files
pirjtaketo1113
authored andcommitted
Mute deliberate deprecation
RuntimeError: Warnings were generated: /home/runner/work/rspec-rails/rspec-rails/lib/rspec/rails/matchers/have_http_status.rb:219: warning: Status code :unprocessable_entity is deprecated and will be removed in a future version of Rack. Please use :unprocessable_content instead.
1 parent 9d5fc66 commit 2a96ffb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

spec/rspec/rails/matchers/have_http_status_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,7 @@ def create_response(opts = {})
502502

503503
context 'with deprecated rack status codes' do
504504
it 'supports the original names' do
505+
allow(Rack::Utils).to receive(:warn).with(/unprocessable_entity is deprecated/, anything)
505506
expect(create_response(status: 422)).to have_http_status(:unprocessable_entity)
506507
end
507508
end

0 commit comments

Comments
 (0)