class RSpec::Rails::Matchers::HaveHttpStatus::SymbolicStatus

def set_expected_code!

Raises:
  • (ArgumentError) - if an associated code could not be found

Other tags:
    See: Rack::Utils::SYMBOL_TO_STATUS_CODE -
def set_expected_code!
  @expected ||=
    Rack::Utils::SYMBOL_TO_STATUS_CODE.fetch(expected_status) do
      raise ArgumentError,
            "Invalid HTTP status: #{expected_status.inspect}"
    end
end