diff options
author | Rick Olson <technoweenie@gmail.com> | 2007-03-27 14:04:06 +0000 |
---|---|---|
committer | Rick Olson <technoweenie@gmail.com> | 2007-03-27 14:04:06 +0000 |
commit | 2a305949d756c054cee349c1ef3b39c6cf1496f8 (patch) | |
tree | 6de4aa3106b92e128a6b62dae9938b73a1f7ed03 /actionpack/lib/action_controller/assertions | |
parent | 4b78a2a245cb69e958e3d62d4c0e6fcab2eb3e76 (diff) | |
download | rails-2a305949d756c054cee349c1ef3b39c6cf1496f8.tar.gz rails-2a305949d756c054cee349c1ef3b39c6cf1496f8.tar.bz2 rails-2a305949d756c054cee349c1ef3b39c6cf1496f8.zip |
documentation project patches, closes #7342, #7319, #7316, #7190 [jeremymcanally]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6470 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller/assertions')
4 files changed, 6 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/assertions/dom_assertions.rb b/actionpack/lib/action_controller/assertions/dom_assertions.rb index d1eea59ea0..355080fe54 100644 --- a/actionpack/lib/action_controller/assertions/dom_assertions.rb +++ b/actionpack/lib/action_controller/assertions/dom_assertions.rb @@ -1,7 +1,7 @@ module ActionController module Assertions module DomAssertions - # test 2 html strings to be equivalent, i.e. identical up to reordering of attributes + # Test two HTML strings for equivalency (e.g., identical up to reordering of attributes) def assert_dom_equal(expected, actual, message="") clean_backtrace do expected_dom = HTML::Document.new(expected).root @@ -11,7 +11,7 @@ module ActionController end end - # negated form of +assert_dom_equivalent+ + # The negated form of +assert_dom_equivalent+. def assert_dom_not_equal(expected, actual, message="") clean_backtrace do expected_dom = HTML::Document.new(expected).root diff --git a/actionpack/lib/action_controller/assertions/model_assertions.rb b/actionpack/lib/action_controller/assertions/model_assertions.rb index a9bcd7db9a..5fc5c81cb7 100644 --- a/actionpack/lib/action_controller/assertions/model_assertions.rb +++ b/actionpack/lib/action_controller/assertions/model_assertions.rb @@ -1,7 +1,7 @@ module ActionController module Assertions module ModelAssertions - # ensures that the passed record is valid by active record standards. returns the error messages if not + # Ensures that the passed record is valid by ActiveRecord standards and returns any error messages if it is not. def assert_valid(record) clean_backtrace do assert record.valid?, record.errors.full_messages.join("\n") diff --git a/actionpack/lib/action_controller/assertions/response_assertions.rb b/actionpack/lib/action_controller/assertions/response_assertions.rb index cf30569f36..de7efd0ac9 100644 --- a/actionpack/lib/action_controller/assertions/response_assertions.rb +++ b/actionpack/lib/action_controller/assertions/response_assertions.rb @@ -119,6 +119,7 @@ module ActionController end private + # Recognizes the route for a given path. def recognized_request_for(path, request_method = nil) path = "/#{path}" unless path.first == '/' @@ -131,6 +132,7 @@ module ActionController request end + # Proxy to to_param if the object will respond to it. def parameterize(value) value.respond_to?(:to_param) ? value.to_param : value end diff --git a/actionpack/lib/action_controller/assertions/routing_assertions.rb b/actionpack/lib/action_controller/assertions/routing_assertions.rb index 11a649c49a..6cd4d48b9e 100644 --- a/actionpack/lib/action_controller/assertions/routing_assertions.rb +++ b/actionpack/lib/action_controller/assertions/routing_assertions.rb @@ -82,6 +82,7 @@ module ActionController end private + # Recognizes the route for a given path. def recognized_request_for(path, request_method = nil) path = "/#{path}" unless path.first == '/' |