aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorErich Menge <erich.menge@me.com>2012-04-01 08:39:57 -0500
committerErich Menge <erich.menge@me.com>2012-04-01 08:39:57 -0500
commit6e814ce62f8225c5f23f7a73d2896699ea99af48 (patch)
tree215091263e96a95cbadf72328f4741ad2d2459ce /guides
parentbf8c3eb55ac037afc63875a2d78ad0799f56a3cc (diff)
downloadrails-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')
-rw-r--r--guides/source/testing.textile2
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, &amp;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.|