aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source/testing.textile
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2011-04-19 21:54:10 +0200
committerXavier Noria <fxn@hashref.com>2011-04-19 21:54:10 +0200
commite162e912c9f2b3ed5789a2d262c7962a67fb6b5d (patch)
treefbcbe9039276b5f652d143e5eb527b6fa14f2182 /railties/guides/source/testing.textile
parenta19c260038a9b5b688a2e8d883b604983ac59eae (diff)
parentad602869260b4233f7471f8aa467d3b83ffeb801 (diff)
downloadrails-e162e912c9f2b3ed5789a2d262c7962a67fb6b5d.tar.gz
rails-e162e912c9f2b3ed5789a2d262c7962a67fb6b5d.tar.bz2
rails-e162e912c9f2b3ed5789a2d262c7962a67fb6b5d.zip
Merge branch 'master' of git://github.com/lifo/docrails
Conflicts: railties/guides/source/ajax_on_rails.textile railties/guides/source/generators.textile
Diffstat (limited to 'railties/guides/source/testing.textile')
-rw-r--r--railties/guides/source/testing.textile4
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/guides/source/testing.textile b/railties/guides/source/testing.textile
index e2317661ea..9b1ef22b97 100644
--- a/railties/guides/source/testing.textile
+++ b/railties/guides/source/testing.textile
@@ -415,8 +415,8 @@ NOTE: +assert_valid(record)+ has been deprecated. Please use +assert(record.vali
|_.Assertion |_.Purpose|
|+assert_valid(record)+ |Ensures that the passed record is valid by Active Record standards and returns any error messages if it is not.|
-|+assert_difference(expressions, difference = 1, message = nil) {...}+ |Test numeric difference between the return value of an expression as a result of what is evaluated in the yielded block.|
-|+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_difference(expressions, difference = 1, message = nil) {...}+ |Test numeric difference between the return value of an expression as a result of what is evaluated in the yielded block.|
+|+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|