You can use symbol http status in webmock.
Add this line to your application's Gemfile:
gem 'webmock-symbol-http-status'
stub_request(:get, 'www.example.com'). to_return(status: :ok)