Ruby on Rails latest stable (v4.2.7) - 0 notes - Class: Test::Unit::Assertions

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v1.1.6) is shown here.

These similar methods exist in v4.2.7:

assert_response(type, message = nil) public

Asserts that the response is one of the following types:

  • :success: Status code was 200
  • :redirect: Status code was in the 300-399 range
  • :missing: Status code was 404
  • :error: Status code was in the 500-599 range

You can also pass an explicit status code number as the type, like assert_response(501)

Show source
Register or log in to add new notes.