From 6e814ce62f8225c5f23f7a73d2896699ea99af48 Mon Sep 17 00:00:00 2001
From: Erich Menge <erich.menge@me.com>
Date: Sun, 1 Apr 2012 08:39:57 -0500
Subject: :success includes the whole 200 range, not just 200.

  # File lib/rack/response.rb, line 114
114:       def successful?;    @status >= 200 && @status < 300;       end
---
 guides/source/testing.textile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'guides/source/testing.textile')

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.|
 
-- 
cgit v1.2.3

