rspec-rails
https://github.com/rspec/rspec-rails
Ruby
RSpec for Rails 5+
RSpec::Rails::Matchers#have_http_status
Passes if `response` has a matching HTTP status code. The following symbolic status codes are allowed: - `Rack::Utils::SYMBOL_TO_STATUS_CODE` - One of the defined `ActionDispatch::TestResponse` aliases: - `:error` - `:missing` - `:redirect` - `:success`
Edit
git clone [email protected]:rspec/rspec-rails.git
cd rspec-rails
open lib/rspec/rails/matchers/have_http_status.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-RSpec--Rails--Matchers-have_http_status-for-pr
# Commit to gitgit add lib/rspec/rails/matchers/have_http_status.rbgit commit -m "better docs for RSpec::Rails::Matchers#have_http_status"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-RSpec--Rails--Matchers-have_http_status-for-pr
hub pull-request
# Celebrate!