diff options
author | Erich Menge <erich.menge@me.com> | 2012-04-01 08:39:57 -0500 |
---|---|---|
committer | Erich Menge <erich.menge@me.com> | 2012-04-01 08:39:57 -0500 |
commit | 6e814ce62f8225c5f23f7a73d2896699ea99af48 (patch) | |
tree | 215091263e96a95cbadf72328f4741ad2d2459ce /guides/source/testing.textile | |
parent | bf8c3eb55ac037afc63875a2d78ad0799f56a3cc (diff) | |
download | rails-6e814ce62f8225c5f23f7a73d2896699ea99af48.tar.gz rails-6e814ce62f8225c5f23f7a73d2896699ea99af48.tar.bz2 rails-6e814ce62f8225c5f23f7a73d2896699ea99af48.zip |
:success includes the whole 200 range, not just 200.
# File lib/rack/response.rb, line 114
114: def successful?; @status >= 200 && @status < 300; end
Diffstat (limited to 'guides/source/testing.textile')
-rw-r--r-- | guides/source/testing.textile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/guides/source/testing.textile b/guides/source/testing.textile index 60b0aa89b9..d35be6a70e 100644 --- a/guides/source/testing.textile +++ b/guides/source/testing.textile @@ -412,7 +412,7 @@ NOTE: +assert_valid(record)+ has been deprecated. Please use +assert(record.vali |+assert_no_difference(expressions, message = nil, &block)+ |Asserts that the numeric result of evaluating an expression is not changed before and after invoking the passed in block.| |+assert_recognizes(expected_options, path, extras={}, message=nil)+ |Asserts that the routing of the given path was handled correctly and that the parsed options (given in the expected_options hash) match path. Basically, it asserts that Rails recognizes the route given by expected_options.| |+assert_generates(expected_path, options, defaults={}, extras = {}, message=nil)+ |Asserts that the provided options can be used to generate the provided path. This is the inverse of assert_recognizes. The extras parameter is used to tell the request the names and values of additional request parameters that would be in a query string. The message parameter allows you to specify a custom error message for assertion failures.| -|+assert_response(type, message = nil)+ |Asserts that the response comes with a specific status code. You can specify +:success+ to indicate 200, +:redirect+ to indicate 300-399, +:missing+ to indicate 404, or +:error+ to match the 500-599 range| +|+assert_response(type, message = nil)+ |Asserts that the response comes with a specific status code. You can specify +:success+ to indicate 200-299, +:redirect+ to indicate 300-399, +:missing+ to indicate 404, or +:error+ to match the 500-599 range| |+assert_redirected_to(options = {}, message=nil)+ |Assert that the redirection options passed in match those of the redirect called in the latest action. This match can be partial, such that +assert_redirected_to(:controller => "weblog")+ will also match the redirection of +redirect_to(:controller => "weblog", :action => "show")+ and so on.| |+assert_template(expected = nil, message=nil)+ |Asserts that the request was rendered with the appropriate template file.| |